What are the two reasons why animals produce sound?

Communication:

To communicate with each other, animals produce sounds. Sounds can be used to convey various information such as, warnings, threats, attract a mate, or maintain contact between group members.

Echolocation:

Animals use echolocation to navigate and find prey. This involves producing high-frequency sound waves and then listening for the echoes that bounce back. Animals can use these echoes to generate images and perceive their surroundings in places with limited visibility. Bats and dolphins are renowned for their echolocation capabilities, but other animals like shrews, tenrecs, and oilbirds also use it to some extent.