Torah, Deuteronomy 22:08: When you build a new house, you shall make a guard rail for your roof, so that you shall not cause blood [to be spilled] in your house, that the one who falls should fall from it [the roof].
This rule also comes from the fact that, firstly, the roof was once considered the safest place where one could hide from wild animals. Therefore, it served as a refuge for sleep.
Secondly, in the Mediterranean climate, the houses were very hot and people slept on the roofs in the cool. The law to create a fence (Maake) on the roofs comes precisely from this fact, and this direction must be strictly enforced.
Therefore, in Israel the roof of each house is fenced.
The inner meaning of this commandment is that in this way you must build your screen, like in a Sukkah (in a hut). Through it, the upper Light comes to you from above and your desires ascend.
Therefore, there should be a restriction on all impure desires in the screen so that no one can use it to harm. After all, if you use the screen for your own sake, it collapses and this is considered a descent.
From KabTV’s “Secrets of the Eternal Book,” 9/28/16