When the glory of God was about to pass, Moses needed protection. Targum Pseudo-Jonathan, the Aramaic paraphrase of the Torah, describes the shielding with mystical precision.
"It shall be that when the glory of My Shekhinah passes before you, I will put you in a mearat tinra, a cavern of the rock, and will overshadow you with My Memra, My Word, until the time that I have passed by" (Exodus 33:22).
The cave is not a hiding place. It is a shelter of stone inside which the prophet becomes eligible to survive what would otherwise consume him. And the roof of that shelter is not ordinary rock. It is the Memra, the Word of the Lord, interposed between Moses and the passing glory.
This is the Targum at its mystical height. God shields Moses from God. The Memra, that strange Aramaic concept of the divine Word acting as God's own agency in the world, becomes here a buffer. Moses is in the rock. The Word is over the rock. The glory flows past the Word.
The sages understood this as the moment Moses received the deepest Torah of all - the knowledge of divine mercy that would be chanted forever after in the Thirteen Attributes. You cannot learn that Torah from outside. You have to be inside the rock, covered by the Word, while glory passes.
Takeaway: The deepest glimpses of God come to those who are willing to be hidden by God first. The rock is not the cost of the vision. The rock is how the vision is given.