outhouse
Atheistically
Here is a very simple explanation from Why are there two different Creation accounts in Genesis chapters 1-2?. There are many much more detailed articles online if one is actually, honestly interested in the truth:
the reason for two different creation accounts is due to two ancient books that were compiled together.
there are 5 different authors if you count the redactor who heavily edited the compilation