Learning from the Animals — Eruvin 100b
אמר רב חייא מאי יא]:דכתיב מלפנו מבהמות ארץ ומעוף השמים יחכמנו [איוב לה:... אמר רבי יוחנן אלמלי לא ניתנה תורה לישראל למדנו צניעות מחתול וגזל מנמלה ועריות מיונה ודרך ארץ מתרנגול
Had we not received the Torah we would have been able to learn various middos (character traits) from other sources. This Gemara gives four examples of animals whose traits and actions we could have learned just by observing them.
Hashem gave animals middos so that we would be able to learn from them (see Rashi here). All middos that we find in animals we can find in ourselves, as well. Hashem put these middos into them so that we should learn to utilize them properly (Mussar Chochmo, Mishlei 6:6). The Maharal explains that animals do not actually deliberately and consciously act, out of their personal wisdom. Rather, these middos are part of their nature. Animals act a certain way, but not because they understand what they are doing; their nature is to act this way. The ant is neither diligent in her work, nor abstinent from theft because possesses wisdom or the fear of Heaven. Rather, this is her nature.
What exactly is the purpose of this engrained nature?
The purpose is to teach us derech eretz — how we should act. Hashem teaches us derech eretz through the animals and birds. This is one of the reasons why they were created (ee Etz Yosef ad loc.). Neither the ant nor the dove avoided theft because its forbidden. Rather, they do so in order for us to learn to act like them.