Dams are very important for storing water supply. They can store up lots of water that would have otherwise gone to waste. It also creates huge lake reservoirs like the Folsom Lake in Sacramento that could be used further as a water supply. Dams have lots of other benefits other than storing water, they also create electricity, which is very vital to everyday things.
If you want to imagine it, say there were 8 months with continual rain, the dam would hold a lot of rain water behind it. Then there were 10 months with no rain at all, the only source of water after a while would be the accumulated rainwater behind the dam. That is why it is an important form of storing and supplying water.