In the very first sentence that Hashem speaks to Moshe Rabbeinu, He instructs him to remove his shoes from his feet, explaining that the place where he is standing is holy ground (Shemot 3:5). The Ramban notes that one may not wear shoes in a place of exalted sanctity; the Midrash in Shemot Rabbah comment that it is forbidden to wear shoes in any place where Hashem’s Presence is revealed, and this is why the Kohanim were barefoot when serving in the Beit HaMikdash. The Gemara (Sotah 40a) indicates that the Kohanim also are not permitted to wear shoes when going to the Duchan (platform) for Birkat Kohanim, though this rule is for different reasons, as mentioned there; the Poskim discuss exceptions to the rule due to various illnesses and other factors (see, for example, Igrot Moshe O.C. 2:32, Tzitz Eliezer 14:11, and Yechaveh Daat 2:13). When the ground itself is hallowed, however, there do not appear to be any exceptions and only bare feet are allowed.
In analyzing the reason behind the directive to Moshe to remove his shoes, the Chida suggests that it is designed as an allegory, to teach an important lesson. Inasmuch as the function of shoes is to protect the feet from stones and thorns and the like, their removal makes one susceptible to these obstacles. Similarly, if Bnei Yisrael are comfortable in their exile in Mitzrayim, the comfort needs to be removed if redemption is to take place. As long as they do not feel the pain associated with being in Galut, there is no hope for Geulah. The “shoes,” representing that which allows the people to be satisfied with their present condition, must be removed; they need to experience true suffering until they sense that there is nothing they can do but cry out to Hashem, and only then will He redeem them. Hashem is hinting to Moshe that the more intense the suffering of the people is, the closer to the Geulah they progress.
Rav Chaim of Volozhin, in his Nefesh HaChaim (1:5) and in his Ruach HaChaim on Pirkei Avot (1:1), while likewise understanding that Hashem’s instruction here was an allegory, presents a very different approach, indicating that just as shoes serve the lower part of one’s body, one’s entire body really is in existence to serve the Neshamah, the soul. The Neshamah, of course, relates to the uppermost spheres in heaven, but it functions in this world too. Moshe, according to this interpretation, was being told symbolically to remove his body from his soul and prepare himself spiritually for his mission as a spokesman for Hashem. The Chafetz Chaim writes similarly that anyone who wishes to come close to Hashem must remove all separations between Hashem and himself. Any place in the world has the potential to become sanctified by Hashem’s Presence; one who wishes to interact with that Presence must remove all barriers, just as Moshe removed his shoes.
A most interesting explanation is presented by Rav Yosef Salant of Yerushalayim in his Be’eir Yosef (which he published only after being urged to do so by Rav Shlomo Zalman Auerbach). He notes that shoes represent man’s lordship over all the other items and creatures on earth – the inanimate objects, the plants, and the animals. Shoes generally are made of animal skins, and they step on and even trample the plants and the inanimate objects, reflecting man’s complete dominion on earth. It is for this reason, he asserts, citing the Shelah, that we recite the morning blessing of “SheAsah Li Kol Tzorki,” “Who has provided me my every need,” in connection specifically with wearing shoes, as stated by the Gemara (Berachot 60b). Putting on shoes symbolizes man’s power and ability to dominate everything on earth, implying that his needs can indeed be well taken care of.
All this is true in general, most of the time. But in the presence of Hashem, such as in a place where Hashem has revealed Himself openly like at the burning bush, or in the Beit HaMikdash, where His Presence can be sensed, man must remove his shoes, because there it is most inappropriate for man to demonstrate any power or dominion. Man has no lordship in the presence of Hashem, and he certainly can not do anything that flaunts his power or sovereignty; he must therefore remove his shoes in those special locations. Perhaps this is an additional reason for the prohibition against wearing ordinary shoes on Yom Kippur, when one is supposed to feel that he is before Hashem all day. Man has no authority in front of Hashem, and therefore he may not display any. While we are indeed masters of the world in a certain sense, we are reminded from time to time who the true Master is.