“It is a sign between Me and the Jewish people that in ‘six days’ G-d created the heavens and the earth” (Shemot 31:17). Shabbat, more than any other mitzvah, marks the special relationship between G-d and the Jewish people. Our observance of Shabbat is a sign of our faithfulness to our Creator and, G-d forbid, our desecration of it indicates the abandonment of G-d (at least in Talmudic times, it did). The Talmud thus compares the public violation of Shabbat with idolatry, disqualifying the shechita of both (Chulin 5a).
One who violates Shabbat “testifies falsely that G-d did not rest during creation” (Rashi, Chulin 5a, s.v. ella). The person does not necessarily deny that G-d created the world, but he denies that G-d, who created the world, “rested” on the seventh day.
Interestingly, while a Jew who publicly violates Shabbat is deemed the equivalent of an idol worshipper and is, in theory, liable to the death penalty, a non-Jew who observes Shabbat is, in a rather startling assessment, deserving of death at the hands of heaven (Sanhedrin 58b). Shabbat is a precious gift given to the Jewish people only, symbolizing the marriage of G-d and His people. A non-Jew who observes Shabbat while remaining a non-Jew is, symbolically at least, guilty of adultery.
With this understanding, it is rather surprising to learn that “One who slaughters on Shabbat or Yom Kippur, despite the fact that he forfeits his life, the shechita is kosher” (Chulin 14a). Having declared public Shabbat violators akin to idolaters, and their shechita invalid, how can the Mishna allow us to eat an animal slaughtered on Shabbat?
There is a fundamental difference between a mumar lechallel shabbat, one for whom Shabbat has no meaning and is no different than any other day, and one who basically keeps Shabbat but may violate it on occasion. One may eat meat slaughtered by the occasional Shabbat violator. Alternatively, only one who publicly violates the Shabbat would have his shechita disqualified, but not one who did so away from the public eye.
In the midst of the Talmudic discussion of possible limitations of the Mishna, the Gemara quotes the following Tanaatic dispute.
“One who mistakenly cooks on Shabbat may eat from the food, [however, if he] cooked the food intentionally he may not eat it; these are the words of Rabbi Meir. Rabbi Yehuda says [if cooked] mistakenly it can be eaten on Saturday night, if cooked intentionally it is forbidden [to him] forever” (Chulin 15a).
If one accidentally cooks on Shabbat, being that no intentional wrong was done, the food may be eaten, Rabbi Meir argues, on Shabbat itself, even by the one who cooked it. If the person purposely cooked the food on Shabbat, then it is forbidden to be consumed; but, as Rashi explains, only on Shabbat itself. After Shabbat, not only may others partake of the food, but so may the one who cooked it. However, they must wait kedei sheya’asu, the amount of time it would have taken to cook the food had they begun cooking after Shabbat. In this manner they are not considered to be deriving benefit from the prohibited activity on Shabbat.
Rabbi Yehuda is of the view that even if the violation of Shabbat was unintentional, it would be inappropriate for anyone to eat the food on Shabbat itself. But once the time period of kedei sheya’asu is over, all may eat to their hearts’ content.
However, if the Shabbat was intentionally violated in the cooking of the food, Rabbi Yehuda declares that the one who cooked the food may never eat it—we do not allow one to benefit from a sin knowingly committed—whereas those who did no wrong, i.e., everyone else, may eat the food after Shabbat, provided they wait kedei sheya’asu.
As we all know, the line between an accident and a deliberate act can be very thin, and many accidents can more accurately be classified as (unintentional) negligence. Hence, Rav Yochanan HaSandlar takes a more stringent approach, forbidding one who cooked food even “mistakenly” to ever derive benefit from it. If the food, however, was intentionally cooked on Shabbat, “it is forever forbidden, both to the one who cooked it and to everyone else.”
Rashi, citing the Gemara (Bava Kamma 71a), notes that this is not a rabbinic punishment, but is based on Rav Hiyya’s understanding of the verse, “You shall guard the Shabbat, for it is holy unto you; those who desecrate it shall be put to death” (Shemot 31:14). Rav Hiyya interprets that “just as one may not derive benefit from that which is holy (i.e., items dedicated to the Temple), so, too, it is forbidden to derive benefit from [prohibited] actions done on Shabbat”.
This is a fascinating interpretation. Work on Shabbat is not profane; rather, work done on Shabbat is so holy that man may not benefit from it. Shabbat is the day on which we acknowledge that all belongs to G-d. Any work done on that day is to be considered as hekdesh, as an object dedicated to G-d’s Temple from which man is prohibited to derive benefit. In the Temple itself all is hekdesh, belongs to G-d, and hence the Temple service continues on Shabbat uninterrupted. In the dwelling place of G-d, there is no need to “rest”. (In fact, more melacha, had to be done in the Temple on Shabbat than on a regular weekday.)
On Shabbat we bring the Temple into our homes, dedicating the day to service of G-d; and hence, it is specifically those activities that are necessary for the functioning of the Temple which are prohibited on Shabbat.
The Shulchan Aruch (Orach Chaim 318:1) accepts the view of Rav Yehuda that one who cooks food intentionally on Shabbat can never eat it. However, others may eat the food immediately after the conclusion of Shabbat, without waiting kedei sheya’asu. The requirement to wait applies only when a non-Jew has cooked the food on Shabbat.
This seems counterintuitive. Why are we stricter regarding food cooked by a non-Jew on Shabbat, something that is perfectly permissible, than we are regarding food cooked by a Jew who violated Shabbat intentionally?
Our Sages realized that many are lax regarding non-Jews and Shabbat. If we could eat the food immediately after Shabbat, we might be tempted to ask a non-Jew to cook for us on Shabbat. Hence, our Sages removed this “temptation” by prohibiting the food until kedei sheya’asu. But knowing that no religious Jew would ever let even the most non-observant Jew to cook on their behalf on Shabbat—even if they would happily volunteer to do so—the rabbis saw no reason to forbid benefiting from the Shabbat violation of another Jew once Shabbat is over.
What was true 2,000 years ago remains true today.
 Why someone would believe G-d created the world in “six days” but deny that G-d rested on “the seventh” is not explained, and might seem a bit odd to us. Perhaps it is the notion that rest, too, is part of the creative process that so bothers this person. In any event, at least this person recognizes G-d as the Creator (though that is far from enough). Atheism, the denial of the existence of G-d, is a much more severe form of idolatry.
 While there is a court-administered death penalty (in theory) for the violation of Shabbat, violation of Yom Kippur carries a penalty of karet, excision. One who slaughters an animal of Yom Kippur is literally mitchayev benafsho, forfeiting his soul.
 This is an important distinction that applies in many areas of Jewish law. For example, we distinguish between one who occasionally speaks lashon hara, i.e., all of us (Bava Batra 165a), and one who is a ba’al lashon hara, a master of speaking lashon hara. It is only regarding the latter that the halacha has some very harsh comments to make.
 While there is no logical reason for one to violate the prohibition of amira lenochri, asking a non-Jew to do work on our behalf on Shabbat, but still follow the rabbinic injunction against benefiting from work done by that same non-Jew, our Sages understood that we are not always logical beings and that certain laws have more mazel than others.