When studying literature, we must study not only its content but also its form. This is especially true in the study of poetry, where the words themselves offer only a limited understanding of the text. Our understanding of Torah, in addition to its description of the Divine, is as a work of profound literature and poetry[1], and our study of Torah is greatly enhanced when we apply these same standards to its study.

The Torah presents the holidays in a variety of places and contexts, each adding additional layers of meaning to them. In Parshiot Emor, Pinchas and Re’eh, the primary presentations of the holidays, they are presented as a separate unit focusing on the mitzvoth of the day, the sacrifices and the national celebration in Jerusalem, respectively. Yet in parshiot Mishpatim and Ki-Tissa, they are presented as an “adjunct” following a seemingly unrelated series of laws (and narrative). These presentations are very similar, with much being a word-for-word “repetition”, making the context all that more important. The words may be the same, but the message is not. 

Parshat Mishpatim, following on the heels of Sinai, presents Judaism’s civil code of law. Jewish life is hallowed in the mundane--our treatment of slaves, animals, strangers, and property. Just prior to discussing the shalosh regalim, the Torah presents a series of laws focusing on what might be called societal ethics--not oppressing the stranger, running away from falsehood, eschewing any form of bribery, letting the poor eat from one’s field in the shmitta year--and even presents Shabbat as an opportunity for rest "for you, your family, your cattle and the stranger".  It is in this context that we read the words, “Three times a year, celebrate for me during the year” (Shemot 23:15), followed by a series of laws relating to and defining the essence of the holidays.
 
Parshat Ki-Tissa has as its central theme the chet haegel, and it is in this context that the Torah presents the shalosh regalim. It follows on the heels of G-d’s revelation to Moshe of the 13 attributes of mercy and the reestablishment of the covenant with the Jewish people--something that was not at all certain to occur. The Torah most appropriately “concludes” the story of the golden calf with an admonition that, “You shall not make yourselves molten gods” (Shemot 34:17) and immediately continues[2] with, “the holiday of matzot you shall observe...”, followed by a series of laws relating to and defining the essence of the holidays.
 
The shalosh regalim of parshat Mishpatim are celebrated as holidays reflecting our social system of equity. They are a time when we must ensure the poor and stranger are cared for, because it is so easy to forget them as we celebrate with our families. It is for this reason that they follow a reference to shmitta and ensuring the poor are allowed free access to the fields, and explains why Shabbat is observed “so that your servant and the stranger may rest” (23:12). We celebrate with the call to ensure that our justice system is impartial, eschews any form of corruption and that “we distance ourselves from falsehood”. Our holidays can only be truly meaningful in the context of a just society. 
 
The shalosh regalim of parshat Ki-Tissa have a different focus. There is no mention of the poor of strangers or shmitta. Rather, they celebrate the special relationship between G-d and the Jewish people. It was on Pesach that G-d redeemed us from Egypt, on Shavuot that He revealed Himself to us through the medium of Torah, and it is on Sukkot where we look to G-d to protect us from the terrible winds that often surround us. G-d cares greatly for us and thus, demands much from us. He often presents us with challenges and more. We rarely if ever live up to our potential, but G-d is always there for us. No matter how grievous the sin--and committing idolatry forty days after Divine revelation, a mere seven weeks after the Exodus, is pretty grievous--our relationship with G-d is never severed. Even--nay, especially--after the golden calf, we are to celebrate the holidays, celebrating the power of forgiveness and our enduring relationship with the Divine. 
 
Of course, the shalosh regalim of Mishpatim and Ki-Tissa are one and the same; the very similar language drives home that point[3]. Our relationship to G-d is reflected in our relationship to man--man who is created in G-d’s image. It surely is not coincidental that the holidays of Mishpatim and of social justice precede those of Ki-Tissa and of our relationship to G-d.
 
 
[1] The Torah defines itself as poetry (see Devarim 31:19) . For a beautiful explanation of this idea, see the introduction of the Netziv to his Torah commentary, Kidmat haemek, paragraph gimmel. For an English adaptation, see here.
 
[2] The Torah demarcates the end of a unit with a “parsha break”, i.e., a blank space the equivalent of nine letters or until the end of the line. If it is important to study the sequence of “parshiot”--and it is--it is much more crucial to study the order of the verses when there is no parsha break dividing them.
  
[3] For an analysis of the differences of language that do exist, see for example the commentary of the Netziv, Hamek Davar, Shemot 34:18-26).