Then the Lord said, “Because the outcry against Sodom and Gomorrah is great and their sin is very grave, I will go down to see whether they have done altogether according to the outcry that has come to me. And if not, I will know.” –ESV
Q: If God sees all, why was this hands-on inspection necessary?
A: This passage is an anthropomorphic representation of God. It really is written this way to assure the readers that God did take the time to fully consider the situation. It is presented in human terms so that the people of that day could better understand.