There are two main reasons I have seen regarding the purpose of animals. One view maintains that their purpose is as a type of "test" for humanity as to how we treat living beings that are not our equals. Do we treat them with compassion? Do we think about their physical and emotional pain? These issues are in fact discussed in Jewish sources, and many of our mitzvot (commandments) deal with our relationship to the animal world.
Another view maintains that animals, which are very often so similar to human beings, are there to teach us lessons about life. These lessons include what the level of existence without the exercise of free-will (unlike human life) looks like. Sometimes animals can teach us positive character traits. For example, the ant shows us group cohesion and the lioness shows us self-control.
I think we can learn all the above and much more from animal life.