Remember, the Israelites were not asking how photosynthesis works or details about the physics of light and darkness. They weren’t wondering how you can have “night” and “day” if these are dependent on the earth’s rotation around the sun. They were wondering if the God who had rescued them from slavery was powerful enough over other gods. They were learning that their God didn’t battle other gods to make the world. This God speaks and it happens.