Maimonides (Guide, book ii, chap. xxxi)
It is perhaps dear why the laws concerning Sabbath are so severe, that their transgression is visited with death by stoning, and that the greatest of the prophets put a person to death for breaking the Sabbath. The commandment of the Sabbath is the third from the commandment concerning the existence and the unity of God. For the commandment not to worship any other being is merely an explanation of the first. You know already from what I have said, that no opinions retain their vitality except those which are confirmed, published, and by certain actions constantly revived among the people. Therefore we are told in the Law to honour this day; in order to confirm thereby the principle of Creation which will spread in the world, when all peoples keep Sabbath on the same day. For when the question is asked, why this is done, the answer is given: "For in six days the Lord hath made," etc. (Exod.xx. 11). Two different reasons are given for this commandment, because of two different objects. In the Decalogue in Exodus, the following reason is given for distinguishing the Sabbath: "For in six days," etc. But in Deuteronomy (chap. v. 15) the reason isgiven: "And thou shalt remember that thou hast been a slave in theland of Egypt, etc., therefore the Lord thy God commanded thee," etc. This difference can easily be explained. In the former, the cause of the honour and distinction of the day is given; comp. "Therefore the Lord hath blessed the day of the Sabbath and sanctified it" (Exod. xx. 10), and the cause for this is, "For in six days," etc. But the fact that God has given us the law of the Sabbath and commanded us to keep it, is the consequence of our having been slaves; for then our work did not depend on our will, nor could we choose the time for it; and we could not rest. Thus, God commanded us to abstain from work on the Sabbath, and to rest, for two purposes; namely, (1) That we might confirm the true theory, that of the Creation, which at once and clearly leads to the theory of the existence of God. (2) That we might remember how kind God has been in freeing us from the burden of the Egyptians.-- The Sabbath is therefore a double blessing: it gives us correct notions, and also promotes the well-being of our bodies.