Why should the author of Genesis have felt obliged to use both these accounts, and why did he not at least modify his sources enough to harmonize the contradictions? The scholars – who of course refer to him as redactor, not author, generally explain that he viewed his inherited literary materials as canonical, which meant both that he had to incorporate them and that he could not alter them.
-Robert Alter, The Art of Biblical Narrative, p.141
Later, Alter suggests that it was possible there were other creation narratives in circulation that were axed when the compiler (or author right!) was putting everything together. These two HAD to be kept though. They were certain to be accurate, despite their being incompatible on some of the details.