Animals contribute to biodiversity by playing various roles in ecosystems. They help maintain the balance of ecosystems by controlling populations of other species, dispersing seeds, pollinating plants, and recycling nutrients. This diversity of species helps ecosystems be more resilient to environmental changes and disturbances, as different species may be more or less affected by certain conditions, ensuring that some species can survive and adapt to changing conditions.