I think dams are also used to control the water flow and prevent floods, how to solve that instead?
Dams are also a hazard when there is a lot of rain because you eventually have to open it or risk failure. As the dam gets older it tends to silt up and its integrity becomes less trustworthy, even less water fits in. This requires necessitating expensive maintenance to remedy. Getting rid of it might be cheaper in the long run.