This passage brings up some really interesting questions. Is Abraham more insightful than God? Is Abraham more gracious and concerned about the righteous than God is? Is Abraham's plan better than God's? This passage has the first biblical recording of a discussion between a man and God, where it seems that the man changes God's mind (There are other occasions where this happens later in the Bible - Ex. Moses convincing God not to destroy the idolatrous Hebrew people). These are always difficult passages for readers to understand, because it seems like a flawed, finite human being corrects the one and only perfect and Holy God. How are we supposed to interpret that? If God can be wrong in this situation...if God doesn't know what's best and gets talked out of a course of action by a provably flawed person...how do we know that God's will is always best?
Well, you have to start from the beginning. You have to start from what you know about God, not from what you think you know about God from this one discussion with Abraham. What do we know about God? We know that God is love - I John 4:8. We know that God is just and without flaw - Deut. 32:4. We know that God is holy - Lev. 19:2. We know that God is perfect - Psalm 18:30. These are things we know about God according to scripture (And these are just some of the countless examples of verses that speak to God's perfect nature). So if we start from this place - a place where we understand that God is perfect, just, holy and loving - we know that Abraham could not have been correcting God. God was not wrong in the judgment He eventually poured out on Sodom. The perfect God of love and justice decided that the most loving and just thing He could do for all of creation was to remove Sodom from the earth. That is the truth...that is a fact!
Then why did God allow Abraham to question Him and even concede a point to Abraham in agreeing to save the town in 10 righteous people were found? Because God is love. He knows that Abraham cannot see the big picture (Just like you and I often cannot). He knows that Abraham is confused by his limited human perspective and cannot understand how this decision by God is actually a reflection of His perfect and loving nature. God knows that death is not the end (Because He is in charge of how the "end" is gonna play out). God knows that the few righteous who might happen to be in Sodom would be justified in eternity. God knows that both the righteous and wicked will all face stand before God at judgement, and has chosen to bring judgement day to them sooner rather than later for the sake of all of humanity. The destruction of Sodom is actually an act of merciful love as God looks at the big picture. Yet because God loves Abraham and understands his lack of knowledge, He postpones the destruction to accommodate Abraham's shortsightedness. This story actually just shows us another perspective on God's love and reminds me that God cares about His people. Take heart in that!