Many of those mistakes were scientific ones. With no sun, there would have certainly been evening or night, but there could have been no morning. To the prescientific mind that wrote this, it probably made sense. The solar system of which earth is only a tiny part is itself an infinitesimal speck in the universe. Surely, then, the creation of the stars would not have occurred so quickly and suddenly if six days were needed to create the world.
Scientists now know that the creation of stars is an evolutionary process that is still ongoing.
From the existence of heavy elements in our solar system, astronomers generally agree that it formed from debris left over from a supernova that occurred billions of years ago. The prescientific Genesis writer knew none of this, however, and that is why he viewed the creation of the universe as an Elohistic afterthought. No modern, scientifically-educated writer would have made that mistake. The creation of the stars is the subject not only of scientific error in the Bible but also of textual contradiction. Declare if thou hast understanding.