"BaSukkos Teishvu Shivas Yamim" (Emor 23:42). Chazal explain (Sukkah 2a) that the Torah is saying, "Leave your diras keva, your permanent dwelling, your home, and live in a diras arai, a temporary dwelling, for seven days." What is the purpose of living in a diras arai for seven days? And why are we commanded to do so specifically at this time of the year?
One answer might be that during Sukkos, the Chag Ha'Asif, which celebrates the new harvest, there is a concern that one might get carried away with his financial success. He might mistakenly perceive that kochi v'otzem yadi asah li es ha'chayil hazeh - my strength and the power of my own hand made me successful. The Torah, therefore, commands us to leave our comfortable, protective homes and enter into the sukkah, a temporary, flimsy dwelling that is open to the sky, to reinforce the notion that man is constantly dependent on rachamei shamayim - Divine assistance, to achieve anything in life. Whether we sit in a sukkah to commemorate how Bnei Yisrael in the midbar were protected by the clouds of glory or they sat in actual huts (Sukkah 11b), the lesson is the same, namely that just as Hashem protected Bnei Yisrael in the midbar, so too He is the one who protects and provides for each one of us.
The Chida (Simchas HaRegel, Sukkos) adds that there is a second important message that living in the diras arai of the sukkah is meant to highlight, and that is that our existence in Olam Hazeh is only temporary, that all the pleasures of the physical world are ephemeral and insignificant. Lasting, eternal pleasure can only be achieved through our involvement in talmud Torah, mitzvos and ma'asim tovim. By commanding us to sit in the sukkah right after the Yamim Noraim, the Torah wants to remind us how important it is to have the proper sense of priorities if we want to follow through on our teshuva resolutions, to effect meaningful change in our lives.
This, writes the Chida, is the idea that Yaakov Avinu tried to convey after his encounter with Esav. The posuk says, "And Yaakov traveled to Sukkos, and he built for himself a home (bayis), and for his cattle he made huts; therefore he called the name of the place Sukkos" (Vayishlach 33:17). Why did he name the place Sukkos? He should have named it "Bayis" after the home he built. The Chida explains that by building huts for his cattle (l'mikneihu) and naming the place Sukkos, Yaakov Avinu wanted to express the idea that all worldly possessions (mikneh) are only temporary, so they don't deserve to be stored in a permanent structure.
The Chida's comment can shed light on the statement of the Tur (Orach Chaim 417) that the mitzvah of sukkah was given to Bnei Yisrael in the merit of Yaakov Avinu who built sukkos for his cattle. What is the connection between the sukkos of Yaakov Avinu and the mitzvah of sukkah? The answer is that the purpose of living in the diras arai of the sukkah is to help us develop the perspective of Yaakov Avinu that material possessions are insignificant, and that one should focus his attention in this world on spiritual pursuits which have lasting value.
This could also be the reason why we read Koheles on Chol HaMoed Sukkos to remind us how temporary, frustrating and unfulfilling life in this world can be. The only accomplishments which have lasting value are spiritual ones. The bottom line is what Koheles writes in his conclusion, "In the end, when all is considered, fear G-d and keep his mitzvos, for that is the whole purpose of man." The message of Koheles is that to achieve real success in this world, one must have an appreciation of what is primary and what is secondary, what is temporary and what has lasting value.
Rav Shmuel Aharon Yudelevitch, a son-in-law of the famed tzaddik Rav Aryeh Levin zt"l, once suggested (see Me'eelo Shel Shmuel, p. 264) that perhaps this is why Sukkos is called z'man simchaseinu because the sukkah is a vehicle which can teach us how to be truly happy. The message of the sukkah is that life in this world is aria - it is only temporary. All physical pleasure is fleeting. The older a person gets the more he appreciates how the endless pursuit of physical pleasure doesn't really satisfy a person. The only way to achieve real happiness is by connecting oneself to the Ribbono Shel Olam - by studying His Torah and observing His mitzvos, by focusing on spiritual matters. The yom tov of Sukkos teaches us how to live a more satisfying and meaningful life. It helps keep the fire of the Yamim Noraim burning inside us throughout the winter. It reveals the key to true happiness.