Does this mean God doesn't know everything?
And the Lord said, "The outcry of Sodom and Gomorrah is undeed great, and their sin is exceedingly grave. I will go down now, and see if they have done entirely according ot ts outcry, which has come to Me; and if not, I will know. Genesis 18:20-21
Now, if God DID know what was really going on in Sodom and Gomorrah, then what might bring Him to say to Abraham that He was going to check it out to see if it is true? The Lord began the conversation with one of the angels (obviously for Abraham to hear),
Shall I hide from Abraham what I am about to do, since Abraham will surely become a great and mighty nation, and in him all the nations of the earth will be blessed?Genesis 18:17
This was a lead-in ... a set-up, so to speak. God was using rhetoric. The answer was implied by the question. It was in view of the fact that God was going to pour out every blessing through him.
Notice that God did not say that He had HEARD that the outcry was great, but that "The outcry ... IS INDEED great, and their sin IS exceedingly grave." The next part is more rhetoric spoken for Abraham's sake. God was bringing Abraham in on His plans by giving him His thoughts.
Consider the probability that Abraham was aware of what was going on since his nephew (Lot) lived there. Do you realize that Abraham didn't say anything like, "Oh, I don't think it's that bad!" Instead, he jumped right in with the possibility that there MIGHT be 50 righteous in the city. But Abraham knew it was a stretch because he carefully manipulated the number to 10 ... which covered his family members. Abraham was being given time to INTERCEDE for his nephew. God provoked Abraham to become the INTERCESSOR. That's what it was all about!
Abraham had to plead his cause based on the very character of the God he miraculously came to believe. "Will You indeed sweep away the righteous with the wicked?" It's not that God had to be convinced of this, but it forced Abraham to be convinced of it. Abraham bargained with the judgment of God on the premise of God's goodness and righteousness. "Far be it from You to do such a thing, to slay the righteous with the wicked, so that the righteous and the wicked are treated alike. Far be it from You! Shall not the Judge of all the earth deal justly?" Of course He would ... and did.
God didn't have to find out anything ... it was all for the sake of the one through whom the whole earth would be blessed. :)