Beaver dams provide habitats for the mammals while slowing floodwaters and filtering pollutants from water.