Korach leapt before Moses and demanded: “Does a house filled with holy writings require a mezuzah on the doorpost?”
Moses replied that it does.
Korach argued, “A mezuzah contains only two passages from the Torah, the Shema and ‘Vehaya im shamoa.’ However, in the holy writings there are many, many passages of the Torah. If so, why does a house filled with holy writings need a mezuzah?”
Moses answered Korach that even a home that is filled with holy writings, many more passages than can be found inside a mezuzah scroll, nevertheless needs a mezuzah on the doorpost. Because mezuzah is a commandment in the Torah.
After this, Korach went out and publicly began his crusade against Moses.
A mezuzah is placed in the doorpost, the place that separates the house from the
street. The purpose of the mezuzah is to remind a person, when he leaves or enters his home, that G-d, our G-d, is One, and He demands of us to fulfill His mitzvot.
It is not enough to have a home filled with holy writings, holy books. Sometimes one can have a vast library of Jewish books but not follow what is written in any of them. This is why we need a mezuzah on the doorpost. The mezuzah reminds us that G-d is One, and we need to obey His commandments.
Just as this is true of a Jewish home, it is also true of an individual Jew.
A person can himself be an entire “Jewish library,” and have vast knowledge of Torah. In that case, he may come to believe that he does not need to “affix a mezuzah”—his personal knowledge of Torah is sufficient, and he does not need to fulfill mitzvot.
Moses taught us that this is not the case. Studying Torah is not enough. In addition to study, we must also affix a mezuzah - in our heart and mind. We must remember at every moment that G-d is our G-d; G-d is One. We must keep and obey all His commandments.
Just as a mezuzah is visible to passersby, so must it be evident on a Jew that he remembers that G-d is upon him. It must be evident in all his deeds that this is a Jew who follows G-d’s will, not only when it is convenient or makes sense to him, but all the time.
A person who affixes the concepts of “Hear, O Israel” in his heart merits G-d’s blessings on his home. The passage inside the mezuzah concludes with this blessing: “I will give rain on your land in its time... and you will gather your grain and your wine and your oil, and you will eat and be satisfied.”
(Likutei Sichos vol. 4, p. 1316-18)