The mitzvah to erect a maakeh - a guardrail around the roof of your house, can be interpreted as a lesson on the importance of humility.
The rooftop represents pride and self-importance, and the requirement to place a guardrail around it means that we must limit and contain our pride, for pride and arrogance are the root of all spiritual deterioration.
Moreover, the Sifri states that even the roof of the Heichal—the Temple sanctuary, requires a maakeh.
In spiritual terms, this means that we must be cautious of pride even when it stems from spiritual achievement, for it is equally as harmful as the pride caused by material success.
Certainly, we should be proud and confident about our devotion to G-d and His Torah. At the same time, we must be careful not to allow this to develop into feelings of self-importance and arrogance.
For even upon the roof of the Heichal, i.e., even at the height of spiritual achievement, there is a risk of spiritual downfall if your pride is not contained.
Likutei Sichot of the Rebbe, vol. 24, pp. 141–142