The Bible was written by men as a series of morality tales. Some are good, some are ridiculously bad.
Frankly, the God of the Bible is not a good guy. He is childish and vengeful. Not someone to be emulated and definitely not someone to be worshipped
Now Jesus was a cool guy, preached love rather than fear. He is someone worth emulating
As an Atheist, I have no problems with someone emulating the values of Jesus. But I have to laugh at those who take the Bible seriously and believe it was written by God instead of man.
Jesus knew the same Old Testament stories and saw a God of love. So did the men who wrote the stories of the Old Testament.
In the story of Noah they saw the difference between God's goodness/ways and their own. It is readily--and immediately apparent--they were not measuring up to God (or what they believed about God). That culture saw their own evil as bringing down the disaster that occurred. Goodness would not put up with their evils.
The story of Passover/Exodus: First, it was written in hindsight. Yes, most Jews absolutely believe Moses wrote the first five books of the Bible. I can respect that while holding a very different view.
Delving into Egyptian history, culture, archaeology, etc. a more likely possibility emerges. The nation, at various times, was known for plagues--ten of them, and they worshiped ten Gods to protect them against these plagues. The point of Exodus was to teach the Israelites that these ten gods/goddesses failed in stopping plagues that periodically afflicted Egypt. One plague caused many deaths among the first born. The reason? It is thought a mold or parasite of some kind in the grain. The first born, because of their position, was given a heaping helping of grain, whereas others received less. It caused illness and death.
Recall the ram was considered sacred in Egypt. Painting their lintels with blood of male lambs was a message Khnemu (depicted by a ram, which is why rams were sacred in Egypt, was the god of fertility and procreation. The Hebrews were wishing death to the future of Egypt. Something to be considered: Were the first born already falling ill, when the Hebrews painted their lintels? That is definitely an "In your face!" taunt, that not only had their other ten gods/goddesses failed to protect them from plagues, Khnemu himself was failing to protect Egyptian fertility and procreation. Idols, all of them, while the Israelites were showing/proving they had the protection of the one God of all.
It is also thought the Jews that were in Egypt were only of one tribe, the priestly class. This tribe is the only one where Egyptian names (or a close variant) are seen. Their story, told over time, became the story of all of Judaism.
Basically, both you and I are in the same tub of hot water with those who take the Bible literally. I understand why those who read the Bible literally do not include known history in considering the story. It is harder for me to understand why you only see the modern English and Western culture view that has atheists jumping to the conclusion of God as villain. Atheists would seem more intelligent by discussing the stories as if God was not involved--that people in Biblical times just imagined He was.