Today’s daf (Sukkah 23) discusses the unusual scenario of building a sukkah ‘on the back of an animal’ which Rabbi Meir validates, and Rabbi Yehuda invalidates.
In explaining this debate, the Gemara explains that Rabbi Yehuda asserts from the words: חַג הַסֻּכֹּת תַּעֲשֶׂה לְךָ שִׁבְעַת יָמִים – ‘the festival of Sukkot you shall make for yourself for seven days’ (Devarim 16:13) that a sukkah is only valid if it is fit to use for seven days, while Rabbi Meir rules that while such a sukkah may be rabbinically prohibited, it is still biblically permitted.
In light of this discussion, both Rabbi Yitzchak Zilberstein (Chashukei Chemed: Sukkah p. 137) and Rav Re’em HaCohen (Badei HaAron: Pikuach Nefesh p. 255) consider the halachic validity of sukkot in times of danger where it is likely that those dwelling in the sukkah will have to leave it or dismantle it within the seven days of sukkot. Beyond this, as R’ HaCohen explains, a further consideration is the fact that if someone feels in danger while in the sukkah, they are then considered to be within the category of מצטער (unsettled to the point of feeling pain or anguish) and are exempt from the mitzvah.
With respect to the first point, R’ Zilberstein explains that if the sukkah could be used for the seven days, then even if external factors may inhibit a person from remaining in the sukkah, it is valid. And in terms of the second point – especially where the danger was real (such as a period in 2002 where there were numerous attacks in yishuvim in Israel), R’ HaCohen rules that while an individual is exempt from dwelling in a sukkah, reasonable security efforts should be made to enable those who wish to dwell in a sukkah to do so – and this is because a state has a duty to maintain the morale of its population – which includes their ability to celebrate festivals.
What we learn from here is that there are three factors in the mitzvah of sukkah: 1) The kashrut of the sukkah, 2) the obligation of the individual to observe the mitzvah of sukkah, and, 3) the efforts which should be made for the observance of sukkot by the Jewish people.