According to the conventional reading of Genesis 18:16-33, God decided to destroy Sodom and Gomorrah because of their pervasive evil. In response, Abraham is said to have stepped forward to argue with God, that is, “to argue with Heaven for the sake of Heaven,” to insist that God refrain from such action if a minimum number of righteous people could be found in the cities. While this account is certainly plausible, I do not believe it to be the right or best understanding of the text.
It does seem clear that God was deeply perturbed by the cry of evil in the cities. The work of the angels God sent to the scene seemed to include imposing consequences on the cities. Further, God had action in mind, pondering, “Shall I hide from Abraham that which I will do?” (18:17).
But the text says more. God suggests that Abraham should be in on the decision because one day he will be a great nation, be blessed, and charge his children so that “they shall keep the way of the Lord by doing righteousness and justice.” (18:19).
Further, God discloses in front of Abraham that the outcry against Sodom and Gomorrah is great and the sin grievous. But the Divine does not act immediately to destroy the cities. God says instead that “I will go down and see; if they have done according to the cry that has come to me – destruction! And if not – I wish to know.” (18:21).
Abraham stayed in the presence of God, came close, and responded to God’s statement. With the noble words of a person entrusted by God to carry forward the principles of righteousness and justice, Abraham asks the God who is open to knowing: “Will you really sweep away the innocent along with the guilty?” (18:23)
God wanted Abraham to know of the cry He had heard and to react and respond appropriately.
And hoping that Abraham would live up to His expectations, God wanted a reaction, not so much in the form of an argument, but rather a case made with ethics and facts on how to deal with the problem. Abraham gave it to Him. And, as the Divine Source for righteousness and justice, God found favor with the terms for judgment proposed by His partner on earth.