By controlling and regulating water flow, dams make available more water than would be available from an unregulated water flow.
As noted by others, this isn't entirely cost-free, and there are ecological impacts. Still, on net, many dams do provide real benefits.