Having learned of the tremendous value of Shabbat, we can understand why its desecration is such a severe sin. The Torah prescribes its harshest punishment for it: if one intentionally desecrates Shabbat in front of witnesses who forewarned him, he is liable for death by stoning. If no witnesses were present, but the violation is intentional, he is subject to karet (extirpation), as it is written: “You shall keep Shabbat, for it is holy for you. He who profanes it shall be put to death; whoever does work on it shall be cut off (ve-nikhreta) from among his people” (Shemot 31:14). In actuality, almost no one was ever put to death, as it was rare for all the conditions that would mandate the death penalty to be met. Thus, the Sages state that a court that put one person to death every seven years is considered murderous, and R. Elazar b. Azaria maintains that if it killed one person in seventy years it was considered murderous (m. Makkot 1:10).
Nevertheless, the fact remains that one of the only two cases in the Torah where one was actually put to death is indeed connected to public Shabbat desecration:
When the Israelites were in the wilderness, they found a man gathering wood on the day of Shabbat. Those who found him gathering wood brought him before Moshe, Aharon, and the whole community. He was placed in custody, for it had not been specified what should be done to him. Then the Lord said to Moshe, “The man shall be put to death; the whole community shall pelt him with stones outside the camp.” So the whole community took him outside the camp and stoned him to death – as the Lord had commanded Moshe. (Bamidbar 15:32-36)
The Torah seems to be using this story to teach us how seriously the public desecrator of Shabbat damages the values of the nation and its faith.
Yet it remains difficult to understand how the wood gatherer dared to publicly desecrate Shabbat. A midrash suggests that when God decreed, in the wake of the sin of the spies, that the desert generation would not enter the Land of Israel, some thought that mitzva observance was no longer obligatory. The wood gatherer wished to teach them that everyone must continue to keep the mitzvot. Motivated by exceptional religious fervor, he decided to publicly desecrate Shabbat, so that the nation would be forced to put him to death. This would show everyone how serious the transgression was (quoted in Tosafot, BB 119b). Some maintain that the wood gatherer was Tzelofĥad, who merited daughters who loved the Land of Israel and inherited it.
The severity of Shabbat desecration can also be seen in Zohar, which states that during Shabbat, the fires of Hell stop consuming the wicked, with the exception of those wicked who never observed Shabbat (Zohar II 151:1). However, one who repented – and certainly one who was already punished for his sin, like the wood gatherer – is forgiven and not punished in Hell.