Michael D. Coogan, The Old Testament: A Historical and Literary Introduction to the Hebrew Scriptures (Oxford University Press, 2014), 40-41.
There are…important differences in content [between the two creation accounts]. For example, the first account of creation opens with a watery chaos; in the second, the world is an arid landscape. In the first, animals are created before humans, and humans are created “male and female,” implicitly at the same time; in the second, the first human is made, then the animals, and finally the woman is formed from the human.
Finally, in the second account no mention is made of seven days, heavenly bodies, or divine rest, just as in the first no mention is made of the garden of Eden, the tree of life, the three of knowledge, disobedience, or divine punishment.
This second account of creation and its sequel in the garden thus seems to be from a different author. One of its purposes is to answer, in the style of folklore, some perennial questions: Why are we afraid of snakes, and why do they crawl on their bellies? Why do we wear clothing? Why are the sexes attracted to each other? Why is life so difficult and childbirth so painful? Why do we have to die?