There is a debate between the Rambam and Ramban in connection with the laws related to treatment of animals.
The Rambam felt that all laws of the Torah are גזירת המלך, a decree of the King. They are not רחמים, teaching to be merciful, because if that were the case, we would not be allowed שחיטה,ritual slaughtering, and we would not be allowed to eat animals altogether.
The Ramban disagrees and says that all laws in the Torah related to animals, are specifically for the purpose of teaching רחמים.
The Ramban said that the intellect of an animal is not it’s driving force. However, there is an instinctive love between a mother animal and its offspring. They feel pain like a human, if their babies are harmed in any way. Such an awareness is designed to make us more compassionate human beings.
Kindness and mercy are characteristics that separate the Jew from the rest of the nations.