Aside from the point that most dams don't produce a ton of power, salmonid spawning in the ecosystem also adds nitrogen to banks that encourages vegetation growth, which is beneficial in many ways for both our water supply (e.g. shade helps prevent evaporative losses, trees provide beavers opportunity to build habitat to increase net groundwater storage) and for carbon sequestration via plant growth. The American west has a drought resilience problem and restoring salmon/trout/beaver habitat can be an effective way to attack the problem on several levels. Dams are particularly damaging to Salmonids, both by acting as spawning barriers AND by warming the water to a level that can make survival difficult (salmonids need cold water).
Look at dams like Oroville and Hoover now -- despite producing a lot of electricity, they are not resilient to drought, and river systems lose a lot of drought resistance when you add dams. When you dam a river, you slow and warm the water -- this threatens entire ecosystems adapted to survival where the river runs.
Particularly in salmonid / coldwater fish habitats, dams are pretty damaging. If you want to learn more about the subject, there are a lot of books & documentaries about the Eel river that are worth reading and watching -- the Eel is a good case study in what happens when you dam a river, and what happens when you un-dam it.