The Sefer Hachinuch has a lengthy discussion related to the commandment of Shiluach Haken, sending away the mother bird, before taking her eggs.
There is a difference of opinion between the Ramban, Nachmanides, and the Rambam, Maimonides. The Ramban believed that the Torah is teaching us compassion.
He believed that the mother animal does feel some kind of sentiment of sadness, when her offspring is taken from her. We are to act with such compassion when dealing with animals and people.
The Rambam questions this theory because ultimately, we are permitted to slaughter this bird if it is kosher. He believed that there are reasons for all 613 commandments. However, we must begin with the premise that these Mitzvot are all גזירת המלך, the decree of the King. We will observe them whether we understand them or not. And we accept that some of them, we will never understand, as they are beyond our comprehension.
Nevertheless, the Rambam recognizes that once we accept this premise, it is helpful and even inspiring to investigate and find the deeper meaning behind our G-d given Torah. A wise Rabbi once said that he would never observe a religion where we understood G-d’s ways. It is all about faith and the realization that “His ways are not our ways.”