God is often accused of being unfair, uncaring or unpowerful because there is evil in the world, much of which is heartbreaking.
The evil breaks God’s heart too:
Genesis 6:5 The Lord observed the extent of human wickedness on the earth, and he saw that everything they thought or imagined was consistently and totally evil. So the Lord was sorry he had ever made them and put them on the earth. It broke his heart.
This was in Noah’s day.
If the corruption and violence that filled the earth broke God’s heart, it necessarily broke the heart of the one holding all creation together, and perhaps led to the Flood: an event in which the earth and its waters collapsed under the weight of humanity’s sin:
Colossians 1:17 [Jesus] existed before anything else,
and he holds all creation together.
Despite the extent of violence, God chose to rescue Noah (the only righteous person on earth) and his family, eight adults in total. Noah’s sons were saved by their father’s righteousness and God’s grace, not by anything they had done. The Bible doesn’t tell us they were righteous. The wives were saved just by marrying the right men. We assume the sons helped built the ark, but it’s hard to imagine otherwise.
In telling Noah what was coming next, God also made a promise:
Genesis 6:18 But I will confirm my covenant with you. So enter the boat—you and your wife and your sons and their wives.
That covenant is believed to be an expression of God’s promise to Adam and Eve to redeem humanity, and also a hint of the promise to come after the flood, which was to never again destroy the earth with a flood like that. It’s a promise that a broken-hearted Jesus will never again stop holding creation together, and so destroy the earth, regardless of our evil.