Here. Since the post is long, here is a summary.
This suggests that this explanation for the Sabbath was added by an inspired writer during the exile; as with the authorship of Genesis 1-11, Daniel is the most likely author. This does not mean the Sabbath is irrelevant to the creation, nor does it mean that the days in Genesis 1 are not intended to be understood as natural days. But it does mean that nothing in the Bible tells us the Sabbath was instituted by God in order to commemorate God’s day of rest, or to teach people that He created the universe and everything else in only six literal days.
We know that while Exodus contains the words of Moses, the book itself was not written by Moses, since it speaks of Moses in the past tense and in the third person. So it contains words Moses spoke and wrote, but it places them in the context of the past, from the perspective of someone who was not Moses. That later inspired writer has added explanatory commentary for a later audience.
As I have argued consistently, the days in Genesis 1 are literal 24 days, but the are days on which God gave a vision of creation; He was seen to create, in a vision. From that perspective God “created the heavens and the earth” in six days. But this does not mean He literally took only six days to create the entire universe.