First we have Netziv:
העמק דבר על שמות פרק כ פסוק יב
באמת אין לשבח מ"ע של כיבוד או"א שהוא מדת החסד יותר ממ"ע של מחיית עמלק או איבוד עה"נ שהוא אכזריות ושניהם אינם אלא חוקים וגזירות מנותן התורה ית' וכדאי' בברכות דל"ג ב'. אלא באשר אנו רואים מצות כיבוד או"א שהיא מתקבלת על שכל אנושי ג"כ. עלינו ללמוד ממנה למק"א. ובזה הדרך המה כל טעמי המצות אינם אלא לקרב אל השכל ג"כ. אבל חלילה לחשוב שזה עיקר דעת נותן התורה ית'.
He states that “...all the reasons for mitzvos are only to make them appealing to the intellect... but Heaven forbid to think that they are actually the main intent of the Giver of the Torah…”
Now let us see what Rambam writes:
There are persons who find it difficult to give a reason for any of the commandments, and consider it right to assume that the commandments and prohibitions have no rational basis whatever. They are led to adopt this theory by a certain disease in their soul, the existence of which they perceive, but which they are unable to discuss or to describe. For they imagine that these precepts, if they were useful in any respect, and were commanded because of their usefulness, would seem to originate in the thought and reason of some intelligent being. But as things which are not objects of reason and serve no purpose, they would undoubtedly be attributed to God, because no thought of man could have produced them. According to the theory of those weak-minded persons, man is more perfect than his Creator. For what man says or does has a certain object, whilst the actions of God are different; He commands us to do what is of no use to us, and forbids us to do what is harmless. Far be this! On the contrary, the sole object of the Law is to benefit us. Thus we explained the Scriptural passage, "for our good always, that He might preserve us alive, as it is this day" (Deut. vi. 24). Again, "which shall hear all those statutes (ḥuḳḳim), and say, surely this great nation is a wise and understanding people" (ibid. iv. 6). He thus says that even every one of these "statutes" convinces all nations of the wisdom and understanding it includes. But if no reason could be found for these statutes, if they produced no advantage and removed no evil, why then should he who believes in them and follows them be wise, reasonable, and so excellent as to raise the admiration of all nations? But the truth is undoubtedly as we have said, that every one of the six hundred and thirteen precepts serves to inculcate some truth, to remove some erroneous opinion, to establish proper relations in society, to diminish evil, to train in good manners or to warn against bad habits. All this depends on three things: opinions, morals, and social conduct. We do not count words, because precepts, whether positive or negative, if they relate to speech, belong to those precepts which regulate our social conduct, or to those which spread truth, or to those which teach morals. Thus these three principles suffice for assigning a reason for every one of the Divine commandments. (Guide 3:31, Friedlander translation)
The contrast is remarkable!
(Cue the creative reinterpretations to harmonize them...)