In principle, it would be prohibited to prepare food on Yom Tov for consumption on Shabbat. To circumvent this restriction, the Rabbis instituted Eruv Tavshilin. Whenever a holiday falls out on a Friday - or, as in our case, Thursday and Friday - we take a piece of bread (matzah) and a cooked dish (oftentimes a hard boiled egg) before the holiday begins. We recite the blessing and eruv declaration and set the food aside for Shabbat use. It is said that, in this way, we demonstrate that we have commenced our preparations for Shabbat prior to Yom Tov. This permits us, in effect, to complete those preparations on the holiday itself.
On the surface, it is not clear what this legal fiction really accomplishes. After all, in the final analysis, we will be cooking and toiling on Friday, a Yom Tov, for the sake of Shabbat, in contradiction to the essential halakha that forbids such activity. What do we gain from this apparently contrived "solution"?
An answer to this difficulty can be gleaned from the Rambam. In the Mishneh Torah, the Rambam codifies the laws of Eruv Tavshilin in the sixth chapter of the Laws of Yom Tov. Strangely, however, he changes the topic of the chapter midstream, in halakha 15, and begins expounding upon the mitzvot to honor Yom Tov and rejoice therein. What is the connection between the technical performance of Eruv Tavshilin and the commandment to celebrate on the Holidays? (Incidentally, this unusual juxtaposition is not only found in the Rambam's presentation. The Talmud, in the very beginning of second chapter of Masekhet Betzah, also discusses the laws of rejoicing on Yom Tov in the midst of its exploration of the laws of Eruv Tavshilin.)
It seems that when Yom Tov falls out on Erev Shabbat we are faced with a unique conundrum. On one hand, Friday is generally the day that the Torah designates as a time of preparation for Shabbat. A double portion of Manna fell for the Jews in the wilderness on Friday and they were commanded "it is Shabbat, a holy day of rest unto Hashem, tomorrow - so whatever you will bake, bake now; whatever you will cook, cook now; whatever is left over, save for the morning."
On the other hand, Yom Tov is a day of rejoicing - a day when, by definition, one should not be preoccupied with preparations for anything else. One's mind and heart should be fully engaged with the thematic content and spirit of the holiday. So, in a certain sense, a Friday Holiday is an inherent contradiction in terms - it is a Yom Tov, a day good in its own right and worthy of its own recognition, but is simultaneously a Friday, a day designated to serve the needs of Shabbat observance.
This, I believe, is the basis for the concept of Eruv Tavshilin. Were we to begin our Shabbat cooking and preparation on Friday, we would be implying that this particular Friday, like all others, is a vehicle for Shabbat and not a time of sanctity in its own right. The Eruv Tavshilin reminds us that, while we are permitted to cook on Yom Tov for Shabbat, that cooking should be seen as a secondary activity, an afterthought, as it were, and not as the main event of the day.
It is of no moment that we do more work for Shabbat on Yom Tov, quantitatively speaking, than we did before Yom Tov. The point is that the requirement to commence food preparation in advance defines the activity on Yom Tov as the completion of a process begun beforehand. Were we to begin cooking from scratch on Yom Tov for Shabbat, this would serve to establish the very identity of the day as a day of preparation. Beginning Shabbat preparations before Yom Tov makes the statement that the work we do on Yom Tov for Shabbat is not a reflection of any change in the essential nature of Yom Tov and should not be seen as compromising its sanctity. We are merely "finishing up" pre-Yom Tov chores on the Holiday.
This explains why the Rambam linked Eruv Tavshilin to the mitzvah of celebrating on Yom Tov. Celebration on Yom Tov is tied to the fact that we view it as a day of holiness and significance in its own right. This significance can be diminished when Yom Tov falls out on Friday and is "hijacked" by the demands of Shabbat preparation. If we relate to the Friday Holiday as little more than a period set aside for Shabbat cooking, this will undermine our ability to genuinely celebrate it.
The impact of such a breakdown would not be limited to the Yom Tov that happens to fall out on Friday. Indeed, the Rabbis were concerned that permitting cooking on Yom Tov for Shabbat could compromise people's esteem for Yom Tov across the board, even when it is observed in the middle of the week. The very fact that Yom Tov can occasionally be instrumental in serving the needs of another day - Shabbat or otherwise - could detract from its importance, sanctity, and joyousness in the eyes of the population at large.
This is where Eruv Tavshilin comes in and "redeems" the joyous quality of Yom Tov. Eruv Tavshilin conceptually transforms the cooking that will take place on Friday into the legal equivalent of an afterthought. This, in turn, underscores and emphasizes the independent significance of Yom Tov, even when it falls out on Friday. As a result of fulfilling the Rabbis' commandment of Eruv Tavshilin, the character of Yom Tov as a time of rejoicing - regardless of the day of the week on which it is celebrated - is preserved and reinforced.
I have more to say about this general area, and further related sources on which to comment, but I will have to save it for Hol Hamoed!
Hag Kasher V'Sameah.