In addition to other answers, dams are sometimes used for mechanical power without generating electricity. More likely to be historic use than current use, but also likely to be a candidate for removal for fish habitat.
Right, it's like with literal wind mills (not wind turbines). In a very few cases it's part of a museum showing how mechanical power was used to mill flour, or power weaving machines, or whatever. Getting rid of literally every single one would be a mistake. But in the other cases they're just left to decay and so we should remove them and restore what was there before.