16 When the men got up to leave, they looked down toward Sodom, and Abraham walked along with them to see them on their way. 17 Then the Lord said, “Shall I hide from Abraham what I am about to do? 18 Abraham will surely become a great and powerful nation, and all nations on earth will be blessed through him. 19 For I have chosen him, so that he will direct his children and his household after him to keep the way of the Lord by doing what is right and just, so that the Lord will bring about for Abraham what he has promised him.”The writer of this passage possesses the telepathic power to read God's mind. Okay, God is contemplating another mass murder and wondering whether to tell his pal Abe. At the same time, God is not omniscient. Apparently someone has told him that the people in Sodom and Gomorrah are doing really bad things (unspecified), but he has to go there physically and check it out to be sure.
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?”Okay, so evidently God is physically present in some form. By going "down and see if what they have done is as bad as the outcry that has reached me" he means walking over there with his three angels. For some reason he has stayed behind, however, and Abraham walks up to him. I guess he's an old guy with a long white beard? How does Abraham know what God is planning to do? God was wondering whether to tell Abraham or not, but has not, as far as we know, actually done so. Whatever. It turns out that Abraham thinks he's more ethical than God, and manages to get God to agree with him. Then Abe starts bargaining.
26 The Lord said, “If I find fifty righteous people in the city of Sodom, I will spare the whole place for their sake.”
27 Then Abraham spoke up again: “Now that I have been so bold as to speak to the Lord, though I am nothing but dust and ashes, 28 what if the number of the righteous is five less than fifty? Will you destroy the whole city for lack of five people?”Let us note furthermore that undoubtedly at least half the population of the cities consists of children. This does not seem to have occurred to either Abraham or God, or if it has they don't care. And if God is all powerful, why can't he spare the righteous while sweeping away the wicked? It's also interesting that God doesn't ordinarily destroy the wicked or spare the righteous. Natural disasters are indiscriminate, and wicked people quite often do just fine.
“If I find forty-five there,” he said, “I will not destroy it.”
29 Once again he spoke to him, “What if only forty are found there?”
He said, “For the sake of forty, I will not do it.”
30 Then he said, “May the Lord not be angry, but let me speak. What if only thirty can be found there?”
He answered, “I will not do it if I find thirty there.”
31 Abraham said, “Now that I have been so bold as to speak to the Lord, what if only twenty can be found there?”
He said, “For the sake of twenty, I will not destroy it.”
32 Then he said, “May the Lord not be angry, but let me speak just once more. What if only ten can be found there?”
He answered, “For the sake of ten, I will not destroy it.”
33 When the Lord had finished speaking with Abraham, he left, and Abraham returned home.