The Torah contains a surprising number of laws relating to the treatment of animals. “You must not see your brother’s ox or sheep wandering lost and ignore them, but you must return them…and similarly his ass”
“Do not look on if you see your brother’s ass or ox fallen by the roadside and ignore it. You must help him raise them.”
“If you come across a bird’s nest on the road, up a tree or on the ground with babies or eggs and the mother is sitting on the babies or eggs. Do not take the mother with the babies. Send away the mother bird and you may take the babies so that He will be good to you and you will have to have a long life.”
“Do not force an ox and a donkey to plough under the same yoke.”
And these are the laws in this part of the Torah. There are plenty of others such as not killing or sacrificing a mother animal and her baby on the same day or not muzzling animals as they work grinding grain.
The Talmud debates the issue. Is this a matter of God showing to mercy to animals? Perhaps it is rather that if we are commanded to be sensitive to animals, them how much more so should we be sensitive to other human beings? And perhaps it is a combination of both!