The point of the flood was not to wipe out humanity but to remove the evildoers.
I have a thought I haven't seen explored here.
The tribal shamans elaborated upon an old tribal myth in an attempt to control and manipulate their people.
To me this makes more sense than most of the explanations I have seen to date. And it is a better fit with the scientific evidence which fails to show any credible evidence for this supposed flood.
Religious belief does not constitute scientific evidence, nor does it convey scientific knowledge.