God determines that Abraham should not be kept in the dark regarding what God is "about to do" (18:17). God is concerned that Abraham charge his descendants to "do righteousness," that is, to do justice to the relationship with God in which they stand. If Abraham did not do this, there would be no transmission of the faith to the next generation and hence no community to whom the promises apply.
God's initial words to Abraham (18:20-21) report the cries of unidentified persons about the gravity of the sins of Sodom. God engages in a judicial inquiry with Abraham, and God--determining to show Abraham the ways of justice--consults with him regarding the gravity of the situation in Sodom. God's use of the language of "if not" suggests that the future of Sodom remains somewhat open, even if God has preliminarily decided what to do.
Abraham now stands before God and engages God regarding the situation in Sodom (18:22-33). He raises sharp questions with God about the preliminary decision to destroy the city. He is blunt and persistent, understanding that God welcomes such a challenge (such challenges to God are also present in the laments; for example, Psalm 13). "Shall not the Judge of all the earth do what is just?" (18:25b). Abraham is especially concerned that the righteous in the city not be treated in the same way as the wicked and raises the issue in these terms: How many righteous must there be in the city for God to save it? God honors the question as a legitimate one.
Abraham, for unknown reasons, starts with the number fifty and eventually works his way down to ten. God responds positively to every question Abraham raises. While the numbers should not be interpreted in a precisely literal way, they raise the issue of "critical mass." That is, how many righteous are necessary to save the city from its own destructive ways? The buildup of wickedness in any community can become so deep and broad that there is an insufficient number of righteous left in the city to turn the situation around. When the number gets down to ten, Abraham recognizes this to be the case and leaves off the questioning, recognizing that the destruction of the city would be just.
16 Then the men set out from there, and they looked towards Sodom; and Abraham went with them to set them on their way. 17The Lord said, Shall I hide from Abraham what I am about to do, 18seeing that Abraham shall become a great and mighty nation, and all the nations of the earth shall be blessed in him?* 19No, for I have chosen* him, that he may charge his children and his household after him to keep the way of the Lord by doing righteousness and justice; so that the Lord may bring about for Abraham what he has promised him. 20Then the Lord said, How great is the outcry against Sodom and Gomorrah and how very grave their sin! 21I must go down and see whether they have done altogether according to the outcry that has come to me; and if not, I will know.
22 So the men turned from there, and went towards Sodom, while Abraham remained standing before the Lord.* 23Then Abraham came near and said, Will you indeed sweep away the righteous with the wicked? 24Suppose there are fifty righteous within the city; will you then sweep away the place and not forgive it for the fifty righteous who are in it? 25Far be it from you to do such a thing, to slay the righteous with the wicked, so that the righteous fare as the wicked! Far be that from you! Shall not the Judge of all the earth do what is just? 26And the Lord said, If I find at Sodom fifty righteous in the city, I will forgive the whole place for their sake. 27Abraham answered, Let me take it upon myself to speak to the Lord, I who am but dust and ashes. 28Suppose five of the fifty righteous are lacking? Will you destroy the whole city for lack of five? And he said, I will not destroy it if I find forty-five there. 29Again he spoke to him, Suppose forty are found there. He answered, For the sake of forty I will not do it. 30Then he said, Oh do not let the Lord be angry if I speak. Suppose thirty are found there. He answered, I will not do it, if I find thirty there. 31He said, Let me take it upon myself to speak to the Lord. Suppose twenty are found there. He answered, For the sake of twenty I will not destroy it. 32Then he said, Oh do not let the Lord be angry if I speak just once more. Suppose ten are found there. He answered, For the sake of ten I will not destroy it. 33And the Lord went his way, when he had finished speaking to Abraham; and Abraham returned to his place.
New Revised Standard Version Bible: Anglicized Edition, copyright © 1989, 1995 National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved worldwide. http://nrsvbibles.org