With many myths/legends, there is frequently a small kernel of truth to them that is embellished and expanded. Take for instance the story of Noah's flood. Unto itself, pretty bullshit. But lots of cultures had "mega flood" myths. At a casual level, it could be an exaggeration of normal river flooding or the like. However, I think it may be more likely it was stories of the massive floods following the end of the Ice Age that had been passed down through the generations and warped/changed over that time. We know that there were many spots on Earth, now lost under the ocean, that used to be areas where people lived over 10k years ago.