>>40540205โAnd the Lord said, Because the cry of Sodom and Gomorrah is great, and because their sin is very grievous; I will go down now, and see whether they have done altogether according to the cry of it, which is come unto me; and if not, I will know.โ (Genesis 18:20-21)
If you had read the Bible, you would know many times does God talk to people in simple ways they can understand, like a normal person would, and just as you read in the quote above. That doesn't mean God "didn't know something" and had to come down to see it with his own eyes, much like he didn't need to test Abraham to know what he would do, but this is done for our edification; He's laying out the foundation for the Son of God, the Lord Jesus Christ, being sacrificed on the cross for us, and what the Father who loved his Son would have gone through.