After God is revealed to Moshe for the second time on Mount Sinai, He reveals His attributes of mercy and tells Moshe that He has forgiven the nation of Israel completely.  God informs Moshe that He is renewing His covenant with them, and adds a list of commandments – some related to the prohibition of idolatry, others related to Shabbat and the pilgrim festivals. Part of this list looks very similar to Parashat Mishpatim, where the lengthy collection of "judgments" (mishpatim) is followed by an appendix of "ritual" laws, including Shabbat, pilgrim festivals, meat and milk, etc.  The resemblance between these two parshiyot extends beyond their content; they are also similar in their style and language.

Hence, we need to understand why God repeats an entire body of mitzvot that has already been conveyed – and recently, too.  Furthermore, what is the significance of the slight differences between the two versions?

Through a comparison between the two units, we can understand the dual nature of these laws, and the necessity of renewing the covenant following the sin of the Golden Calf. 

Additional References
Exodus 23
Courtesy of the Virtual Beit Midrash, Yeshivat Har Etzion