From Aish.com:
When the Jews left Egypt and began wandering in the barren desert, they were unarmed, unprotected, and left vulnerable to the elements of wind, cold, bandits and animals. Since they were constantly travelling, God instructed them to build flimsy, temporary booths — called Sukkot.
These hardly provided any protection from the elements. Yet the Jews learned a profound lesson: Safety and security does not come through thick walls and burglar alarms, but ultimately through trust and reliance in God.
Read more about “time of our joy”, here.