There is a famous dispute between Rabbi Eliezer and Rabbi Aqiva about what it is we commemorate with the mitzvah of sukkah. The Torah reads (Vayiqra 23:42-43):
בַּסֻּכֹּ֥ת תֵּֽשְׁב֖וּ שִׁבְעַ֣ת יָמִ֑ים כָּל־הָֽאֶזְרָח֙ בְּיִשְׂרָאֵ֔ל יֵֽשְׁב֖וּ בַּסֻּכֹּֽת: לְמַעַן֮ יֵֽדְע֣וּ דֹרֹֽתֵיכֶם֒ כִּ֣י בַסֻּכּ֗וֹת הוֹשַׁ֨בְתִּי֙ אֶת־בְּנֵ֣י יִשְׂרָאֵ֔ל בְּהֽוֹצִיאִ֥י אוֹתָ֖ם מֵאֶ֣רֶץ מִצְרָ֑יִם אֲנִ֖י יְהוָ֥ה אֱלֹֽהֵיכֶֽם׃
You shall dwell in sukkos for seven days; every native in Israel shall dwell in sukkos. So that your generations will know that I made the Israelites dwell in sukkos when I took them out of the Land of Egypt; I am Hashem your G-d.
The gemara (Sukkah 11b) records the dispute:
ענני כבוד היו דברי ר’ אליעזר ר”ע אומר סוכות ממש עשו להם
“They were clouds of glory,” these are the words of Rabbi Eliezer. Rabbi Aqiva says, “They made themselves actual booths.”
Among commentators on the verse, Rashi follows Rabbi Eliezer, that “I made the Israelites dwell” refers to the clouds of glory. Ramban quotes Rashi, and agrees. Rashbam and Ibn Ezra, on the other hand, focus on the word “basukkos – in sukkos” and understand the literal meaning of the verse to follow Rabbi Aqiva’s mention of physical booths.
In general, aggadic disputes are not decided by the rules of halachic pesaq. Here, however, the dispute has halachic outcome — the verse relays a halachic rule whether through its literal meaning or through a midrashic one. The Torah obligates us to sit in the sukkah “so that the generations will know.” At least lekhat-chilah (ab initio) one needs to have intent, to use the sukkah as a reminder of something. And therefore, which is it? Are we to sit in the sukkah and contemplate the sukkos our ancestors built in the desert, or to remember the clouds of glory Hashem provided us with?
The Tur, Shulchan Arukh, and Arukh haShulchan (Orach Chaim 525) side with Rabbi Eliezer, and we are told we sit in the sukkah to commemorate the clouds of glory. (My apologies to the rationalists.)
Why is Sukkos in the fall?
The aforementioned Tur says it’s so that we make it clear that we are sitting in the sukkah for the mitzvah, and not because it’s a comfortable way to spend a spring or summer day. (I’m not sure that in practice the underlying assumption holds for Israel’s climate.)
The Vilna Gaon gives an answer I found to be more profound, and related to the above dispute. When the Jews left Egypt, we were surrounded by clouds of glory. These clouds departed with the Golden Calf. After the Golden Calf, Moshe went up on the mountain for 40 days to obtain forgiveness for the Jewish People, and another forty days to get a second set of luchos. He returned with the second luchos on Yom Kippur, which is much of why the 10th of Tishrei is Yom Kippur.
On the 11th, Moshe instructed us about building the Mishkan. During the next couple of days people brought their donations, and on the 14th of Tishrei, Moshe had to tell them to stop — that they had everything needed.
So, as our sages compute is, on the 15th of Tishrei, the actual assembly of the Mishkan began. And, the Vilna Gaon notes, the clouds returned.
What we commemorate by sitting in our sukkos is not the initial gift, but the return of the clouds after Yom Kippur.
Returning yet again to R’ Shimon Shkop’s introduction to Shaarei Yosher (sorry for not being able to bring myself to ellide any of it):
One can use this to explain the whole notion of breaking the [first] Tablets, for which I have not found an explanation. At first glance, understanding seems closed off. Is it possible that Moses our teacher would think that because the Jews made the [Golden] Calf they should be left without the Torah? He should have just waited to teach them until they corrected their ways, not break them altogether and then have to fall before Hashem to beg for a second set of Tablets. Our sages received [a tradition that] there was a unique ability inherent in the first Tablets. As it says in Eiruvin (folio 54), “What does it mean when it is says, ‘engraved on the Tablets’? Had the first tablets not been destroyed, the Torah would never have been forgotten from Israel.” Which is, they had the power that if someone learned them once, it would be guarded in his memory forever. This quality Moses felt would cause a very terrible profaning of the holy to arise. Could it happen that someone destroyed and estranged in evil deeds would be expert in all the “rooms” of the Torah? Moses reasoned a fortiori from the Passover offering about which the Torah says “no foreign child shall eat of it.” Therefore Moses found it fitting that these Tablets be shattered, and he should try to get other Tablets. The first Tablets were made by G-d, like the body of writing as explained in the Torah. The latter Tablets were made by man , as it says “Carve for yourself two stone tablets.”  Tablets are things which cause standing and existence, that it’s not “letters fluttering in the air.” Since they were made by Hashem, they would stand eternally. But the second ones, which were man-made, only exist subject to conditions and constraints.
The beginning of the receiving of the Torah through Moses was a symbol and sign for all of the Jewish people who receive the Torah [since]. Just as Hashem told Moses, “Carve for yourself two stone Tablets”, so too it is advice for all who receive the Torah. Each must prepare Tablets for himself, to write upon them the word of Hashem. According to his readiness in preparing the Tablets, so will be his ability to receive. If in the beginning or even any time after that his Tablets are ruined, then his Torah will not remain. This removes much of Moses’ fear, because according to the value and greatness of the person in Awe/Fear of Hashem and in middos, which are the Tablet of his heart, this will be the measure by which heaven will give him acquisition of Torah. And if he falls from his level, by that amount he will forget his Torah, just as our sages said of a number of things that cause Torah to be forgotten. About this great concept our sages told us to explain the text at the conclusion of the Torah, “and all the great Awe Inspiring acts which Moses wrought before the eyes of all of Israel.”
To my mind this can be connected to what our sages explained in Nedarim (folio 38) on the verse “carve for yourself”. Moses didn’t get rich except through the extras of the Tablets. This is an amazing idea – [is it possible that] Hashem couldn’t find any way to make Moses wealthy except through the extras of the Tablets? But through what we said, we can explain this. Through this change of how Tablets are to be readied, there was given opportunity for those who receive the Torah to fear, to accept upon themselves the yoke of Torah. Through this it becomes appropriate for anyone entering the gates of Torah to separate themselves from all the preoccupations of his world. As they interpret the verse “‘it is not on the other side of the sea’ it is not found at salesman or importers.” However, if the first Tablets had remained, then it would be sufficient to establish an easy hour for Torah, and spend most of your time trading and buying. For this reason the Holy One showed Moses as a sign to all who accept the Torah that He would prepare for them their income through the making of the Tablet; any “extras that are carved away” will provide them with income.
 Talmud, Eruvin 54a
 Exodus 12:43. To explain: If one offering can not be possessed by a non-Jew, how much more so should the entire Torah not be possessed by someone who is not merely a non-Jew, but an evil person.
 Exodus 34:1
 Rav Shimon is using an idiom our sages used describe the destruction of the first Tablets. When Moses came down the mountain and the Jews were worshipping the Golden Calf, the letters fluttered up to heaven, and the tablets became heavy, and Moses threw them down. (Tanchuma, Ki Sisa 30; Exodus Rabba 46:1)
The same expression also appears in a description of R’ Chanina ben Tradiyon’s martyrdom. He was wrapped in a Torah, which was set aflame. He was packed with wet wool, so as to prolong his suffering. His students asked him, “Rebbe, what do you see?” He replied, “The parchment is burning, but the letters are fluttering in the air.” (Avodah Zara 18a)
Also possibly relevant is the idiom’s use in contract law, describing the paper or parchment of a contract as a critical component; for example, if the husband refuses to relinquish ownership of the paper, his writ of divorce is invalid, merely “letters fluttering in the air.” (Gittin 20b) The writing surface is an essential element of the text.
 Deuteronomy 34:12, the closing words of the Torah
 The words “for yourself” would seem superfluous. The Talmud (Nedarim 38a) explains that the carving was for Moses in the sense that Moses owned the stone he carved off the second Tablets, which was pure sapphire. This tradition explains why Rav Shimon continues to explain what seems to be overly mundane and trivializing something as important as the Tablet.
 Deuteronomy 30:13
 Talmud, Eruvin 55
The first luchos differ from the second luchos in a similar way to the distinction we just made with respect to the clouds of glory. The first set were given as a gift to the Jewish People with no effort on our part. The second required that Moshe make the preperatory step. Middos work, “carving for yourself “, is now a precondition for being able to receive the Torah.
And similarly, the clouds of glory didn’t return until people took a step by themselves. We first started assembling the Mishkan and only then did Hashem respond by providing the protecting clouds.
Viewed at this level, the Vilna Gaon provides a partial synthesis of the positions of Rabbi Eliezer and Rabbi Aqiva. Yes, we sit the sukkah to remember Hashem providing clouds that protected us. However, those clouds did not come on their own — they were in response to the human effort Rabbi Aqiva places primary.
Yom Kippur was a renewal of the covenant based on the terms that we must take the first step, and Hashem responds. We refine our middos to produce the tablets upon which Hashem engraves the 10 diberos. We build a dwelling place (so to speak) for G-d so that He dwells in our midst, Hashem provides protecting clouds to grant success to our efforts to protect ourselves.
If we but refine ourselves to be capable of cleaving to Hashem, He will cleave to us and grant us success beyond our efforts.