Building a sukkah
ולקחתם לכם ביום הראשון פרי עץ הדר כפת תמרים וענף עץ-עבת וערבי-נחל ושמחתם לפני יקוק אלקיכם שבעת ימים: בסכת תשבו שבעת ימים כל-האזרח בישראל ישבו בסכת
You shall take on the first day an esrog fruit, palm fronds (a lulav), myrtle branches, and willow branches, and you shall rejoice before Hashem your G-d for seven days. You shall dwell in sukkos for seven days. Every citizen of Israel shall dwell in sukkos
Sukkos is known as Zman Simchaseinu, the time of our rejoicing. The days are accentuated with their unique mitzvos, that of taking the four species and dwelling in the sukkah. The Torah introduces these mitzvos in this precise order, first the four species, then dwelling in the sukkah. While the reason for this requires its own study, what’s fascinating is the Sages, when they chose the structure of their teachings on the festival, chose to first discuss the laws of the sukkah, and only then the laws of the four species. Why did the Sages switch the order from that in the Torah?
The Sheiltos, an ancient work composed in the eight century CE, writes something fascinating. He writes that we are obligated to construct a sukkah, and dwell in it. This comes from the verse: “you shall make for yourself a sukkos festival for seven days”, and “you shall dwell in sukkos for seven days”. From the fact that he brings a verse for these two obligations, to build a sukkah and to dwell in it, implies he held that there’s a separate mitzvah to construct a sukkah. Others also seem to hold this way, even though it’s not the predominant view of the halachic authorities over the generations.
This opinion is a bit surprising, since we don’t normally ascribe full mitzvah status to preparatory steps towards a mitzvah. It’s not a mitzvah to buy matzah, even though it is a requirement in order to eat it. It’s not a mitzvah to construct our four species, even though it is a requirement in order to take them. These acts are usually called הכשר מצוות, preparatory steps towards a mitzvah. It must be that constructing a sukkah is different. Since it has its own special verse, unlike other הכשר מצוות, the Sheiltos and others are justified in understanding this to be a mitzvah in its own right. There are even opinions (which we don’t follow practically) which say to make a blessing upon constructing a sukkah. This view makes more sense in light of the Sheiltos’ understanding.
Perhaps this understanding can answer the question we started with. If the Torah starts discussing the mitzvah of the four species, and only afterwards the mitzvah of sukkah, why did the Sages reverse the order? Perhaps we can suggest that the Sages wanted to teach us with a practical mentality. What’s the first mitzvah which is to occur as we approach sukkos? The mitzvah to build the sukkah. This mitzvah is fulfilled the day before sukkos, or even many days before. Therefore, the Sages decided to begin their teachings with the laws of a sukkah.
Chag Sameach and Gut Yom Tov!
 Based on Hearos Rabbeinu HaGrish Elyashiv Sukkah 2a s.v. דיני סוכה קודם לדיני נטילת ד’ מינים
 Targum Onkelos and Rashi ad. loc. Literally: a beautiful fruit
 Targum Onkelos loc. cit.
 Targum Onkelos and Rashi loc. cit.
 Leviticus 23:40, 42
 See next note
 This question is asked by the Aruch LaNer and Poras Yosef to Sukkah 2a. The Aruch LeNer answers because the Mishnayos are practical, and practically speaking a person has to start preparing their Sukkah before they must prepare their four species (as we’ll see, this is not so different than what Rav Elyashiv suggests). They also fulfill the mitzvah of Sukkah the first evening, and the four species only the following morning. However, this doesn’t explain why the Torah lists the opposite order. I once heard a different explanation from Rabbi Reznick, who said that the Torah describes things from our perspective, and the Sages described things from Hashem’s perspective. This comes from an idea given by Rav Levi Yitzchok of Berdichev, brought in Tosafos Chadashim to Pesachim 1:1, to explain why the Torah calls the holiday of Pesach Chag HaMatzos, whereas we call it Pesach. Hashem focuses on the fact that we faithfully left Egypt without provisions other than the bread on our backs (which baked into matzah), and we call it Pesach to commemorate Hashem “skipping” over the Jewish houses during the final plague, sparing the Jewish firstborn. Rabbi Reznick applied the same to Sukkos. The sukkah is meant to remind us of Hashem’s Clouds of Glory, which Hashem used to protect us in the wilderness. The purpose of the four species is to appease Hashem and improve our relationship with him (see Sukkah 38a, Ta’anis 2b, and Ritva to Sukkah 9a s.v. הא דאמרי’ ההוא מיבעי and ibid 31a s.v. ת”ר), so the Torah lists it first. I seem to recall Rabbi Dovid Heber of Baltimore saying a similar explanation from the Tzelach, but I couldn’t find it anywhere. All I found was that in Noda B’Yehudah Al HaMoadim I לולב, ארבעת המינים there’s something from his son-in-law Rav Yosef from Pozna, (brought in his work Zichron She’eiris Yosef), who asks the same question about the discrepancy, and answers like the Aruch LaNer. He adds that the Torah lists the four species first, because the verse is dealing with the chagigah offering, which is brought by day
 Sheiltos § 169
 Deuteronomy 16:13
 Leviticus 23:42
 HaEmek She’eilah ad. loc. infers this
 Rav Elyashiv brings Rashi to Makkos 8a s.v. השתא נמי
 Yerushalmi Sukkah 1:2, brought by Tosafos to Sukkah 46a s.v. העושה
 As already mentioned, the Aruch LaNer suggests basically the same explanation, yet his is simpler
 See Avnei Nezer Orach Chaim 459:10,11