The answer lies in an actual event where God stepped in to destroy people. It's recorded in Genesis chapter 19.
Three visitors came to Abraham and told him that the towns of Sodom and Gomorrah were going to be destroyed by God because of their gross sin. This is from verse 20 on. Abraham was so concerned, he asked the Lord,
"Will you sweep away the righteous with the wicked? What if there are fifty righteous people in the city? Will you really sweep it away and not spare the place for the sake of the fifty righteous people in it? Far be it from you to do such a thing - to kill the righteous with the wicked, treating the righteous and the wicked alike. Far be it from you! Will not the Judge of all the earth do right?"
The Lord agreed with Abraham, that if there were 50 righteous people, He would spare the towns from destruction.
Abraham whittled the number down from 50 to 45, 40, 30, 20, then 10 righteous people. God agreed that He would spare the towns from destruction if only 10 righteous people were found in them.
Well, God got Lot and his family out of Sodom - only 4 people - and then rained down destruction on the rest.
Lots of people will resent that account, claiming it is impossible that whole towns could be so evil in God's judgment that they deserved destruction. But God is the Judge of all the Earth, and He reads people's hearts and minds. On the coming Day of Judgment, everything hidden will be revealed, and cosmic justice dispensed. Never mind hypothetical situations and people - where will you stand if Death visits you unexpectedly tomorrow, or today? NOW is the Day of Salvation and God's patience is very great. Just don't take it for granted.
Jesus said that on the Day of Judgment, it would fare better for Sodom than for some of the towns where people saw Jesus miracles and heard Him preach, yet rejected Him. The Judge of all the Earth will do what is right.