A frequent theme to many posts on this site has been the combining of separate elements — and the ways in which the Pentateuch has involved two or more sources being combined into a single narrative. We have seen this in Genesis, with the creation of the world, and Noah’s flood. The Ten Commandments are no different.
In fact, as is somewhat well known, there are two different versions of the Ten Commandments in the Bible. The first, the best known, is in Exodus (Ex. 20:2-17), but a second — and different — version appears in Deuteronomy (Deut. 5:6-21). One key difference: the reasons for resting on the Sabbath (Ex. 20:8-11; Deut. 5:12-15). These two accounts, of course, must stem from different sources, or later additions or changes to an earlier source. Needless to say, it is quite odd that the Bible itself, if it is putatively a consistent work, would have two different versions. Compare the accounts for yourself.