Why is God asking questions or appearing uncertain in the Bible if He's omniscient? Is God omniscient? lists all the passages were it is written that God is omniscient.

Reading other passages, I found a few things that seemingly contradict this:


In Genesis 3:8-13 God asks Adam and Eve where they are and if they have eaten from the tree
In Genesis 18:20-21 he apparently does not know what they have done


  20Then the LORD said, “The outcry against Sodom and Gomorrah is so great and their sin so grievous 21 that I will go down and see if what they have done is as bad as the outcry that has reached me. If not, I will know.”

In Genesis 32:22-30 God wrestles in his bodily form with Jacob, but asks Him about His name
In Numbers 22:9 He asks “Who are these men with you?”
In Deuteronomy 8:1-2 and other instances, God tests people, but wouldn't He know beforehand what they would do?
Gaining information is not the only reason for asking questions.  Asking questions is a very powerful teaching device--not because the teacher does not know the answer, but because in the answering of the questions the students learn.

Adam was hiding from an omniscient God.  He had never felt the need to hide from God before.  The question helped Adam understand and confess what he had done.  "I'm hiding... I've never hid before... this is the consequences of my sinful choice..."  Adam even had a choice of whether to answer or not.

In response to the question of whether he had eaten of the fruit, Adam blames Eve and even tries to implicate God in it, since He brought her to him.  He had a chance to take responsibility, but he failed in that and reverted to the blame game.

God also asks rhetorical questions, as He did to Job.  "Where were you when I laid the foundations of the earth?"

So, the fact that God asks questions does not mean He lacks knowledge or information and must gain it from the minds of men.  He asks questions for other reasons, just like you and I do in our conversations with other people.

For the question about when God wasn't asking questions (2 and 5)...

God doesn't say He doesn't know what's going in in Sodom.  He just says that He is going to go there to observe it.  He doesn't just observe either--He also takes Lot out of the city.

Testing is another issue.  Like questions, God is not gaining information by it.  It actually does a lot for us, as we build up a history of learning from both the right and wrong decisions we make.  If we are tested and fail, we deal with the guilt and the understanding of what we ought to have done.  If we are tested and succeed, we set a pattern for future testings.