20 Then the LORD said, "The outcry against Sodom and Gomorrah is so great and their sin so grievous 21 that I will go down and see if what they have done is as bad as the outcry that has reached me. If not, I will know." 22 The men turned away and went toward Sodom, but Abraham remained standing before the LORD. 23 Then Abraham approached him and said: “Will you sweep away the righteous with the wicked? 24 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? 25 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?”
[Abraham and the Three Angels by Gustave Dore]
It was Abraham’s doubt that delayed the destruction of Sodom when the Lord told Abraham of what he was going to do. Abraham did not doubt that the Lord WOULD do it, he doubted that the Lord would sweep away the righteous WITH the wicked! God was willing to wipe Sodom off the face of the Earth without even considering that there might be a few innocent people. Abraham then BARGAINED with God to spare the city for the sake of 10 righteous people.
Will not the Judge of all the earth do right?
If Abraham thought that this was unjust and unfitting of God then who has a clearer grasp of morality? God or Abraham? Or was God testing Abraham to see if he would see the moral quandary. To Abraham it appeared that God was willing to annihilate a whole city because they were beyond salvation (how a whole city, including infants, was beyond saving under a “compassionate” God is beyond me). So he pleaded and bargained with God to being less wrathful. Notice that he doesn't question Sodom's sins but is only worried for the innocent.
“Calm down God, I’m sure there is someone worth saving,” I can imagine Abraham saying. And those that were saved consisted of Lot and his family. Lot who offered up his daughters to the men that wanted to “know” the two angels that were under his protection (Genesis 19:8). Lot's wife didn't make it far past the city limits before she too met her fate. Lot and his two daughters escaped to a cave when Lot's daughters impregnated themselves with their father's seed because they believed that they were the last survivors of their family line (or if you want to go one step farther, the last people on earth). Of course, maybe God did intend Lot's family to be destroyed because he knew the Children of Lot, The Moabites and Ammonites, would cause trouble for the Children of Israel later in the future.