Why do Beavers Build Dams?

Beavers build dams as a means of shelter and lodging. They can build several dams if they need to. Most of the building is done over night using limd=bs and braches from trees.