The Gemara brings: Rava said, “how foolish are most people who stand up before a Sefer Torah but do not stand up before a Talmid Chacham. The Sefer Torah states ‘ארבעים יכנו they shall give him forty lashes,’ and the Rabanan came and lessoned it by one, to give only thirty nine lashes.” This seems to reflect that it is more important to stand up before a Talmid Chacham than a Sefer Torah. The Ran is bothered: there is another Gemara which brings that the source to stand up before a Sefer Torah is derived from a Talmid Chacham. If we are obligated to stand up before people who learn the Torah for sure we are obligated to stand up before the Torah itself! This reflects that it is more important to stand up before a Sefer Torah than a Talmid Chacham. How can this contradiction be reconciled?
Avi Mori shlita answered b’shem the Ran that a Sefer Torah is indeed greater than a Talmid Chacham; therefore if one is obligated to stand up before a Talmid Chacham certainly he is obligated to stand up before a Sefer Torah. However the Talmidei Chachomim have a unique attribute that they explain and make the Torah understood. Without them the Torah would be left in a corner and remain unclear. This is as the Torah states ארבעים יכנו which seems that there are forty lashes, however the Rabanan explain and clarify that in truth the Torah means thirty nine; it is a number which accumulates to the counting of forty, but not actually an amount of lashing forty times. People are foolish not to realize that just as one stands up for a Sefer torah he should also stand up for the Rabanan who present us with the understanding of the Torah.
The Rambam paskens: we do not add onto the forty lashes even if one is strong and healthy as Shimshon and can handle being lashed. However, if one is weak we lessen the amount of lashes so that we do not lash him a large amount which will definitely cause him to die. Therefore the Chachamim said do not lash anyone forty times, in case one lash will be added by mistake and will kill the person.
The Kesef Mishneh explains that the Rambam is of the opinion that the amount of forty lashes is d’oraisa, and the Chachamim reduced it to thirty nine. This is as the Gemara brings: although the Torah states ארבעים forty, the Rabanan are given a superior strength over the Torah to hold back one of the lashes. How foolish are people who stand up for a Sefer Torah and not for a Talmid Chacham who have the authority to hold back a ruling in the Torah from being performed.
May we honor Talmidei Chachomim who clarify and teach the Torah, and are even granted the authority to decide whether something in the Torah should be held back based on their infinite wisdom!