There are other similarities between the epic of gilgamesh and genesis beyond just the flood, it's a very interesting subject imo. Ultimately both were originally oral traditions long before they were written anywhere, both emerging out of the ancient east mediterranean/west asian cultural milieu.
IIRC the current scholarly consensus is that the shared parts represent two surviving variants of an even earlier story that was widely told across cultures in that region.
IIRC the current scholarly consensus is that the shared parts represent two surviving variants of an even earlier story that was widely told across cultures in that region.