Douglas Comin explains the rationale behind the execution of the Sabbath-breaker in Numbers 15:
In the 15th chapter of Numbers we find an account of the punishment of a man who boldly broke the fourth commandment. The fact that most modern readers tend to view the penalty, which was death by stoning, as too harsh for the crime indicates how backward our thinking has become.
The Sabbath was given to Israel as a continual reminder that the Lord God dwelt in the midst of His people. To ignore the Sabbath is to deny God as Creator, Governor, Judge and Redeemer.
As Creator, He sanctified the seventh day and declared it holy, as an example for His creatures in all their generations. To break the Sabbath is a practical denial of God as Creator.
As Governor, He instituted a command, based upon the pattern of creation, incorporated in the Moral Law which contains a summary of man’s whole duty toward God and toward his neighbour. To break the Sabbath is a rebellious denial of God as Governor, or Law-Giver.
As Judge, He holds men accountable for obedience to His commands, and punishes those who disobey. To break the Sabbath is a higher-handed denial of God as Judge, as though He had no power and no intention of enforcing His own word.
As Redeemer, God has provided an eternal rest from the ravages of sin – and the Sabbath rest is typical of this eternal rest which remains for the people of God. To break the Sabbath, therefore, is a denial of God’s gracious provision of salvation itself – and the transgression of the Sabbath deprives us of the very means by which God has ordained that this salvation be communicated and applied to His people.
In summary, Sabbath-breaking is a direct offence against God, tantamount to declaring Him dead. James Philip writes, “Reverence for the Sabbath symbolized reverence for God Himself, and violation of its sanctity was therefore…an insult to His majesty. It is in this regard that we can best understand the widespread contemporary neglect and desecration of the Lord’s Day. It symbolizes our generation’s neglect and contempt of the things of God. It is man’s refusal of God.”
This is precisely why Sabbath-breaking was a capital offence. The people themselves were to inflict the punishment for this serious crime, so that they might remember the importance of God’s command, and keep themselves from falling into the same disregard for the Holy One in their midst.