1. A small reason is that Nazare is one of the most westerly points in Europe meaning that the wind, and so ocean swell, sweeps across the Atlantic unhindered.
2. The main reason these waves form is due to an underwater canyon/ravine that leads right up to Nazare. This huge canyon runs 125 miles from the abyssal plain out in the Atlantic Ocean to less than half a mile from the coastline. At its deepest point, the sea bed is more than 3 miles beneath the surface and it rises rapidly to a canyon “headwall” that rises to between 100 and 150 feet just off the coast of Praia do Norte. Currents through the canyon combine with swell driven by winds from further out in the Atlantic to create waves that propagate at different speeds. They converge as the canyon narrows and drive the swell directly towards the lighthouse that sits on the edge of Nazaré. From the headwall to the coastline, the seabed rises gradually from around 32 feet to become shallow enough for the swell to break. Tidal conditions also help to increase the wave height.
Copied mostly from this site: https://www.telegraph.co.uk/news/earth/earthnews/10411252/How-a-100-foot-wave-is-created.html