In seeking to understand what is going on in the account of the flood and why the waters that came upon the earth, we must understand the ANE cosmology. The waters of the flood cause the world to revert the the chaos of a pre-creation state. The flood reveals cosmic warfare between God and Yamm, the god of chaos and storms.
Is the flood account really a beautiful story about rainbows? Hardly! It is a terrible, troubling text about a God who drowns everybody on earth. Christians often read the flood account with blinders on our eyes, and do not really see the way God is presented in this difficult passage.