Many commentaries ask what seems like a difficult question: Why are the rules of lighting the Menorah (24:1) dictated after discussing the observance of the holidays? Not only that, but we’ve already discussed the lighting of the Menorah! Why repeat it?!
To understand this, we must briefly understand the function of the menorah in the first place. It is somewhat strange that we need to provide light in Gd’s sanctuary- does He need the light? Can He not see, even in the dark? It would therefore seem, as the Midrash explains (Tanchuma, Tetzaveh 4), that the light of the menorah is for us, not Hashem. On a simple level, therefore, the instruction to illuminate the Temple is a commandment we must do that serves ourselves.
Oftentimes, we look at the mitzvot in the Torah as deeds for Hashem. We put on tefillin for Him, we keep Shabbos for Him, etc. That is absolutely true. However, we often forget that Hashem designed the mitzvot to help us too. Whether it be in a practical sense like creating family time or it be in a broader, psychological sense, that it makes us more grateful people, doing the mitzvot also helps ourselves. This idea is on display in the Menorah- a light for ourselves.
With this in mind, perhaps we can revisit the juxtaposition of the menorah to the holidays. As the last holiday in the list (immediately preceding the menorah) explains- we observe Sukkot to recognize what Hashem did for us on our way out of Egypt (23:43). Like other holidays listed, we recall and appreciate the evident shelter and sustenance we received from Him. But immediately after that, we must remind ourselves that we not only benefit from what Hashem provides us, but that we also benefit from what we can provide ourselves, by following His mitzvot.