The two main mitzvos throughout the Yom Tov of Sukkos are the ארבעה מינים and the סוכה. In the Torah, the Mitzvah of ארבעה מינים is told to us first and a few Psukim later we are commanded to sit in the Sukkah. However, when it comes to מסכת סוכה, the opposite is the case as the first two chapters deal with the Sukkah and only from the third chapter and on does it deal with the ארבעה מינים. Why is it that the משנה switched around the order when writing the Halachos of these Mitzvos?
When it comes to orders, there is the chronological order of something and the logical order, due to חשיבות. Tosfos in the beginning of Shabbos 2a discusses why the order of the Mishnayos in Shabbos begin with the Halachos of הוצאה as opposed to being mentioned after the מלאכות in כלל גדול. His question is based on many other places in the משניות where the order is based on the chronological order of things. Being that the Mitzvah of Sukkah comes first in time as we sit in the Sukkah at nights, and the Mitzvah of ארבעה מינים only begins on the first day, the chronological order would tell us to first discuss the laws of סוכה and then afterward deal with the ארבעה מינים. However, being that the Torah discussed these Mitzvos in the opposite order, there must be a logic to the order even though it is not chronologically correct.
The Gemara in Zevachim 90a discusses the order of the Korbanos that a יולדת must bring regarding her חטאת and עולה. The Gemara is bothered that the order by her seems to be the עולה is brought before the חטאת, against the general rule that the חטאת is brought first. The Gemara answers אמר רבא למקראה הקדימה הכתוב. Rashi explains שתהא נקראת בענין תחילה אבל בעבודתן חטאת קודמת. Tosfos is bothered with the explanation of Rashi. However, what is clear is that ideally the עולה should be first and that’s why it’s נקראת בענין תחילה. But practically, the חטאת needs to be brought first. How could such a thing be understood?
The Gemara in Zevachim 7b talks about the order which the קרבן חטאת and קרבן עולה are brought. The Gemara says that the חטאת comes first because when a person is סרח מן המלך, first he must bring the פרקליט and then he can bring the דורון. The חטאת is the פרקליט which must be brought first and only then can the דורון, the עולה be brought. We see from here that although ideally the עולה should be brought first, practically speaking the חטאת must be brought first. Therefore, the עולה is נקראת בענין תחילה because in regards to the סדר of חשיבות, the עולה is the higher level in terms of התקרבות to Hashem. But in the סדר of מעשה, the חטאת comes first. The Torah, when mentioning the עולה first is talking in terms of the סדר of חשיבות because the עולה takes precedence in this aspect over the חטאת. The Rambam in Moreh Nevuchim explains the reason we take the ארבעה מינים is to represent all the crop that we are gathering at this time of the year. The holiday is also called חג האסיף because it was the time that farmers would be bringing home there produce for the winter. The idea is that we are to embrace nature but to recognize the ברכת ה' that exists within nature. However, the Sukkah represents the idea of shielding and hiding away from the outside world and being completely enveloped in the protection of Hashem. If it rains, we leave the Sukkah because the Sukkah is the complete opposite of embracing nature. The Sukkah is a commemoration of either the Sukkahs in the desert or the ענני הכבוד. In the desert, there was no produce and nothing natural about our living there. It was all living בצילותא דהימנותא. But such a life was only temporary. Being in the desert in such an environment was only temporary with the end goal being to enter Eretz Yisrael. In Eretz Yisrael, it was a life איש תחת גפנו which was the ideal life.
Therefore, the message of the ארבעה מינים is ideal in the sense that Hashem eventually wants us to be able to live with nature and recognize the יד ה' in everything and not that its כחם ועוצם ידי but that it’s Hashem providing us with the strength. Only because we failed multiple times did we have to pull back from such a life style and take on the life of that which the סוכה represents of being completely cut off from the world and living solely with Hashem. This is why the Torah first mentions the ארבעה מינים because the message it represents is ideal. However the order of the משניות is such putting the סוכה first and only then discussing the ארבעה מינים because such is the practical order. The second Beis Hamikdash was not a complete geulah rather it was a preparation for the Galus that was to follow. This is based on the Gemara in Yoma 21b that says five things that existed by the first Beis Hamikdash were no longer by the second Beis Hamikdash. The Gemara in Brachos 8a says מיום שחרב בית המקדש אין לו להקדוש ברוך הוא בעולמו אלא ארבע אמות של הלכה בלבד. However, the Gemara in Chagigah 6b says כיון שגלו ישראל ממקומן אין לך ביטול תורה גדול מזה. These two Gemaras when contrasted seemed to be a contradiction. But the explanation is that in terms of learning Torah, in Galus, its fine and that’s the meaning of אין לו להקדוש ברוך הוא בעולמו אלא ארבע אמות של הלכה בלבד. But in a broader sense, regarding the application of Torah today אין לך ביטול תורה גדול מזה, because in Galus, the message and meaning Torah is not being applied in the real world. The reason being because in the Galus, the Avodah is to be completely cut off from everything else in the world except for Hashem. Therefore, from the time of the destruction of the Beis Hamikdash, the only place for Hashem is ארבע אמות של הלכה בלבד but that’s only in the learning sense. When the גאולה will come, it will once again become a time where Torah can exist and be balanced in all aspects of Nature and it will be ideal that we will recognize the יד ה' in nature.
This idea could explain the following Psukim in נחמיה (ח, יד-יז)
וימצאו כתוב בתורה אשר צוה יקוק ביד משה אשר ישבו בני ישראל בסכות בחג בחדש השביעי:
ואשר ישמיעו ויעבירו קול בכל עריהם ובירושלם לאמר צאו ההר והביאו עלי זית ועלי עץ שמן ועלי הדס ועלי תמרים ועלי עץ עבת לעשת סכת ככתוב: פ
ויצאו העם ויביאו ויעשו להם סכות איש על גגו ובחצרתיהם ובחצרות בית האלהים וברחוב שער המים וברחוב שער אפרים:
ויעשו כל הקהל השבים מן השבי סכות וישבו בסכות כי לא עשו מימי ישוע בן נון כן בני ישראל עד היום ההוא ותהי שמחה גדולה מאד
How could it be the Mitzvah of Sukkah was overlooked from יהושוע until עזרא that the Pasuk can say וימצאו כתוב בתורה?
Once the Jews entered Eretz Yisrael from the desert, there mission changed from being completely cut off from nature to embracing nature and seeing the ברכת ה' in nature. When Klal Yisrael started working the land, they mistakenly abandoned the idea of the Sukkah thinking that the idea of Sukkah was no longer relevant, to the point where the mitzvah of Sukkah eventually became forgotten. It wasn’t until Ezra came along and he revived the Sukkah idea which gave us the ability to deal with the Galus that was to follow. He provided for us a Judaism that was more mobile.