I have an opinion, but it will be naturalistic. No, God doesn't make mistakes. That God doesn't exist for me, and so can't.
The flood story was invented to account for the finding of marine fossils on mountaintops. Think about it. Suppose you found them. How did they get there? Wouldn't that be so great a mystery that it would occupy much of your thinking until you came up with a plausible answer? What would that be in the days before seafloor uplift was a thing. The mountaintops must have been submerged by the mother of all floods, much bigger than the ones they had seen, which don't cover mountains higher than hills. Only God could have done that, so why would he? What's the answer for every one of these riddles, such as why do we labor for our food and die rather than live in paradise forever? Why were Sodom and Gomorrah destroyed? Why were the Jews exiled into captivity? It's always the same answer: God was man at man, who needed to be smacked. So why was the whole world drowned save one family and a few animals? God was mad at man for being a sinner.
The problem here is that this story depicts the deity as a failure as an engineer twice, first when he made man, an error he regretted, and then when he repopulated the earth using the same breeding stock. Guess what? More sinners. This story is very demeaning to the deity, and not just for these two intellectual errors, but the moral error of indiscriminately destroying terrestrial life whatever the species. I don't think you include a story like that in your mythos unless you think you need to. I don't have another hypothesis for why they would write or include a story like that in a holy book. It's part of the argument that this perfect deity that makes errors and regrets them cannot exist for the same reason that married bachelors don't exist.
In Christianity it is. It's the highway to hell. This religion has a love-hate relationship with free will. On the one hand, it describes it as a gift from god because he loves us and doesn't want "robots," the exercise of which pleases him if one guesses right and wills to believe, and then goes on to try every trick to get one not to exercise it if what one wills isn't what God wills.