A most interesting and profound principle in understanding the essence of Torah learning is hidden away in a Rashi in Parshat Bamidbar.
The verse (3.16) simply states that Moshe counted the Levi’im as instructed. In a parsha dealing with a census of the entire nation this in itself is not exceptional. However, there was a unique feature of the way in which only the Levites were counted, that already aged one month old they were included in the census, as opposed to everyone else who were only counted from 20 years old. Rashi cites the midrash where Chazal present a dillema which faced Moshe Rabbeinu. On being told to count the one month old babies of the Levites, Moshe reflects on exactly how he is supposed to do this. To find the number of babies requires entering the family tents where probably the mothers are tending to their babies and nursing them. For him to enter such a tent would be a violation of the principle of modesty -‘tzniut’. He concludes that it is simply not possible that God wanted him to actually go and find the number of baby Levites, and instead he goes to the tents, waits outside until a miraculous heavenly voice informs him how many small children live in this family. (There is a side issue here which I do not intend to address, about why he needed to go anywhere at all, he could have sat at home and waited for the ‘bat-kol’ to tell him all the numbers?!!)
This midrashic comment contains a profound principle. Even when instructed clearly and directly and specifically through his prophetic powers from God, Moshe understands that he is not supposed to simply follow these instructions unthinkingly, rather he had to PROCESS this instruction to get its deeper meaning, using all the ethical and moral a priori principles which he had learnt elsewhere. If the literal instruction violated a principle of modesty and privacy then THIS COULD NOT POSSIBLY BE WHAT GOD WANTED HIM TO DO!
HaGaon Rav Chaim Shmuelewitz ztz’l in ‘Sichos Mussar’ refers to this Rashi and explains the principle of it in several places (eg 5731 Nitzavim). He uses a revealing expression saying that the concept of ‘derech eretz’ is one of the ‘middot she’haTorah nidreshet ba’hem’, comparing this idea that Moshe re-interpreted the literal meaning, with all the well-known hermeneutic laws of interpretation such as the 13 principles of Rabbi Yishmael. Just as Chazal use the kal va-chomer and the binyan av to discover halacha not explicit in the pasuk, similarly the PRIMACY OF MIDDOT & ETHICAL principles can effect the way we interpret the meaning of the Torah. This is comparable to the way in which the Rambam explainst in Moreh Nevuchim, that once we have a clear conceptual understanding of the infinite non-corporeal nature of God as one of the ‘ikkarei ha’dat’, we look at the text of the Torah through the prism of these a prioir concepts and know for sure that all references to the ‘hand of God’ or the ‘outstretched arm of God’ must be metaphors & not to be taken literally. In our Rashi we find exactly the same principle being used, except that where the Rambam applies philosophical principles, here Chazal apply the moral principles of ‘derech eretz’.
This is no way implies that one can take any moral code and make pronouncements on the value of mitzvot. Each culture and historical era has different moral codes which are rooted in the ideas of a foreign and secular mindset, and to use them as a point of reference from which to judge the Torah makes a mockery of its Divine origin. However, with a total acceptance of the eternal validity of every detail of Torah, we still need to pay close attention to the WAY in which any mitzvah is being performed, conscious of all its moral and ethical aspects.
This is clearly the meaning of the Mishna (Avot 2.1) where Rebbi (Yehuda HaNassie) asks what is the ‘derech yesharah’ that a person should follow in his life? the commentaries remark on the strangeness of this question, since clearly the path to follow is one of Torah and Mitzot! But the answer is that he is referring to someone who of course is already following a life of Mitzvot, and he is saying nevertheless there is a correct WAY to do them, and that is ‘tiferet le’oseha ve’tiferet lo min ha’adam’, meaning that the performance of a mitzvah requires a whole range of personal and communal moral principles to be applied in order for it to be done in the way of TIFERET, -harmony.