According to Ezekiel 18:23-32, God doesn’t enjoy punishing the wicked but has to for the sake of justice for their victims, however, God will show mercy to those who repent. Similar ideas can be found in Isaiah 57:15-21, Jeremiah 18:1-10, Ezekiel 33:10-12, 33:17-20, Psalms 7:1-17, and Psalms 32:1-11. My best understanding of this topic is that we are born with sin nature (Rom5:12-17), so if God destroys all evil, then that would include all people (Isa 57:16) because no one is “good” according to God’s definition of good. Jesus even says this in Matt 19:17, Mark 10:18, and Luke 18:19. One problem is that extremists keep redefining God through one extreme or another. One side looks at the Flood, Sodom, and Gomorrah and says God is a destructive maniac. The other side looks at God’s love and mercy through Jesus in the New Testament, and thinks sin does not matter so we are all free to live as degenerate heathens because of his mercy. Despite the fact that sin was such a big deal Christ had to die for us because sin requires death.
I think the bible is framing God as a balance of both Justice and Mercy. When Adam and Eve sinned and were kicked out of the Garden. God used a Cherubim to block them from getting a hold of the tree of life (Gen 3:22-24). Why? Because of the promise to save humanity ( through bruising of Satan’s head in Gen 3:15), and the corruption of humanity by sin in Genesis 6. In Genesis 6 the earth is so violent and bad that God had to flood it out. Imagine if he let humans have eternal life after sin, it would have been Gen 6 levels of violence forever. Why would a loving God allow an endless cycle of immortal violence? Adding Death to tailor sin’s effects was necessary, we NEEDED DEATH because SIN WAS SO BAD.
So in order to be all good he has to show mercy and justice. Mercy preserves God’s beloved children and creation, but having all mercy means evil run wild forever. So God has to execute justice after his mercy is exhausted, which means every evil being is ultimately stopped. If he only did one and not the other, then God would have destroyed everything in judgment, or evil would have absolutely corrupted all things in mercy. On a localized scale we sow we reap (Gal 6:7-8) and the wages of sin is death. (Rom 6:23) and since everyone has inherited sin nature from Adam (Rom 5:12-17, 1 Cor 15:22), then everyone dies.
The great deluge in Noah’s time was the closest God came to destroying all evil on earth, yet evil is still here because even Noah’s family wasn’t perfect and corrupted by sin. He showed them mercy for Noah’s faithfulness and righteousness but they still died eventually because of their sin. He continues to show mercy to people today, both those in covenant and out of covenant (Matt 5:43-48). However, when mercy runs out, he will eventually separate the wheat [righteous] from the tares [wicked] (Matt 3:12, Matt 13:24-30). So God allows bad things to happen because he made a promise to save us, and even though we deserve destruction, a promise is a promise, so he must allow us to live long enough for at least a remnant of us to receive His mercy and salvation.
Just like Noah’s flood, the Israelites in the wilderness didn’t all experience God’s promise. God made a promise to the Israelites to give them the land of Canaan on Mt Sinai and make them a beacon of light to all nations, but only a portion of them actually inherited that promise. Many of them died in the wilderness because of their sin and only the children of those that made it to the Jordan River, actually got to go into Canaan (Joshua and Caleb were the exceptions). Also, only 1/3rd of Judea was exiled when Babylon conquered them in the second siege, and the other 2/3rds of them were killed, which was a fulfillment of Ezekiel’s prophecy (Ez 5:1-13).
God never promised to save every single person on earth, only those who belong to him (John 10:1-16), and keep his commandments (John 14:15, 1 John 5:1-3). He makes it clear in John 3:16-21, that those who don’t believe in him will be condemned because they love the darkness more than the light. Since sin is in the word and the wages of sin is death, he has a promise of salvation to fulfill from Gen 3:15. Death is good and bad. It sucks because God didn’t initially create things to die, but it’s necessary to keep sin from going on forever. That is why God kicked Adam and Eve out of the garden to prevent them from getting eternal life and sinning forever (Gen 3:22-24).
Death and all the things that cause it are permitted because sin needs to be destroyed. However because he doesn’t want to destroy his righteous people, he shows mercy whenever he can so people can repent, for as long as he is willing. In addition, Isa 57:1-2 makes an interesting point, it says that the righteous who die early are being spared the suffering of a major judgment.