But that's an interpretation, not something the text actually tells us. Genesis never says “the Earth rotated relative to the light, producing 24-hour days.” You're supplying that mechanism to make the literal-24-hour interpretation work. The existence of evening and morning establishes a light/dark cycle in the narrative, but it doesn't by itself establish that those cycles were exactly 24 modern hours long. Additionally, days have become increasingly longer as time goes on in an observable sense to humans. In early earth, rotation cycles lasted roughly 10 hours. The only other explanation that I can think of is God imagining, perfecting, creating, and destroying in units of time that are faster than our current knowledge of time itself.