Floods are terribly destructive, seemingly expansive and inescapable, and randomly unavoidable. The pain and trauma of these events cry out for an explanation, then and now. It's no surprise, then, that most every culture which had the threat of flood (i.e. coastlines, rivers, etc.) also had a tale to tell answers to the questions of, "Who is behind this?" and "Why?" Traumatic events, whether death, disaster, or disease, naturally cause us humans to reflect, and ask ourselves and whatever god we believe in, "Why did this happen? Why did you let this happen?"
Most scholars agree that a massive and destructive flood likely occurred in Mesopotamia ('between the rivers', the Tigris and Euphrates) in about 2900 BC. This prompted those living in the area at the time (Sumeria, Assyria, and the Babylonians--Israel wasn't a nation quite yet) to ask who was behind this catastrophe, and why did it happen. Their literature gives us some interesting answers. Take a look at how they explained these big questions.
In one flood story called Atrahasis, we meet the high god, Enlil, who controls the weather. He had created humans as slaves to do the menial tasks, but since then those humans have just been too noisy... and so he killed all of them by a massive flood. All of them except Atrahasis. Fortunately for him, the water god, Ea, told him to build a large boat and led him to safety.
More interesting still is the story written in the Epic of Gilgamesh (I mentioned this account here, too). Gilgamesh was actually king of Uruk (modern day Iraq) in about 2500 BC, but this story is fanciful fiction about him. Gilgamesh (who happens to be 2/3 god and 1/3 human) is in search of immortality after his close friend dies. He comes across the immortal Utnapishtim (the story's Noah figure), and asks him for the secret to his long life. Utnapishtim says his immortality was actually given to him after he was the lone survivor of a catastrophic flood. The gods had second thoughts when they destroyed all humanity, and so Ea (the water god) gracefully delivered him. There are really striking similarities between this story and the Genesis account that you'll obviously notice, including 1) the god instructs him to build a large boat according to precise measurements and dimensions, 2) he brings his family on board, 3) he brings animals on board, 4) he seals the boat with pitch (or tar), 5) the boat comes to rest on top of a mountain, 6) he releases birds to see if waters have subsided.
(For more on these similarities, check out this 3-part series on Ancient Near Eastern flood narratives and Genesis by Peter Enns.)
It seems clear to most scholars that these stories are cut from the same cloth and answer many of the same questions as Genesis (with Gilgamesh being written about 1000 years prior). But while they have similarities, they have strikingly different perspectives on the gods and humans. Too often, in my opinion, we read through the flood narratives asking the wrong questions and missing the big theological points. Instead of asking how many animals could fit on an ark, how long ago did it happen, how much of the actual earth was covered by water, etc., I want to focus on what Genesis says about YHWH in a culture all too familiar with devastating floods and their explanations.
(For those who want to engage with some of those questions, here is a helpful analysis of flood science and interpretation in recent history.)
The flood narrative of Genesis says something unique about both God and humans. On the one hand, the Mesopotamian gods sound more like the Grinch looking over Who-ville, annoyed at all their noise and in competition for power and control. Israel's God, in contrast, isn't touchy or grumpy--He is a God of standards and purposes for His creation. He is a God of justice and judgment. He's not in opposition to other gods; there is only one God. It's not noise that puts Him over the edge; it's worse. The sons of God (most likely heavenly beings) are coming down and sleeping with women (the progression mirrors Eve in Eden: see something good and take it). Meanwhile, the humans are only focusing on evil continually. This reveals something about Israel's view of mankind: Humans may have a prized place in Israel's understanding of God and the world, but they are terribly flawed, bent on evil, and they soon fall out of God's purpose for them.
Even as Genesis portrays the evil of humanity, it allows us to see another side of YHWH. Genesis says He is deeply troubled, stirred in His heart, about the corruption of the order He created in the cosmos. But He is not presented maliciously, but graciously. In spite of the corruption, God finds grace to show to Noah. In Israel's story, YHWH is the just judge of all creation, but He also shows himself to be Savior and Deliverer of humanity and creation. God takes His creation that ignores its order/purpose, and He quite literally un-does creation. He reverses it. He removes the order He set up in Gen 1 so that creation returns to a watery deep. Instead of the Spirit "hovering over the face of the waters," we see "the ark floating on the face of the waters" (Gen 1:2, 7:18). New creation is happening. And so God repeats His purpose for humanity--to be the image of God--and He repeats His command to the new Adam figure, Noah--to be fruitful and fill the earth. Noah is the new Adam (as if Gen 5:29 didn't give it away already). God is doing something new with this family. To show that He is done with the old, God hangs up His weapon of war (his bow) in the sky.
From the dawn of creation, through the horrific scenes of the flood, and in through the in-breaking of Noah's new creation, we keep finding more reasons to praise YHWH, Israel's faithful God. Genesis 1-9 repeatedly shows us in story form what God says for Himself later in the Pentateuch: "The Lord, the Lord, a God merciful and gracious, slow to anger, and abounding in steadfast love and faithfulness, keeping steadfast love for thousands, forgiving iniquity and transgression and sin, but who will by no means clear the guilty, visiting the iniquity of the fathers on the children and the children's children, to the third and the fourth generation" (Ex. 34:6-7). Praise Him for who He is!