Beavers build dams to create a habitat where they can live and raise their young. Dams also help beavers control water levels in their environment and provide protection from predators. Additionally, the deep ponds created by dams offer easy access to food sources and can help maintain water quality.