Specifically I'm talking about Abu Simbel temple and Philae temple. Which are close to a reservoir created by Aswan dam. It seems to me easier to build a dam than to move a temple.
Shielding them by a dam would have been more costly. And being hidden under a 65 meters deep wall into the water of the Aswan dam would make them visually disappear, and lose their glory.
As it is now they preserve the same commanding view and show the perspective the original artisans who designed these monuments had envisioned.