I've long been intrigued by the idea of God asking a question.
When we ask a question, it's often to get information. What's the temperature today? What time will you be home? Who's going with you? Where do you think you're going, dressed like that? Okay, that last one was more of a statement, but you get the idea.
But when God asks a question, it's never to get information. The reason is obvious: He knows all things.
So why does He ask anything?
Let's take a look at the questions of God in the first few chapters of Genesis.
"Then the LORD God called to the man and said to him, 'Where are you?'" Genesis 3:9
"And He said, 'Who told you that you were naked? Have you eaten from the tree of which I commanded you not to eat?" Genesis 3:11
"Then the LORD God said to the woman,'What is this you have done?'" Genesis 3:13a
Why did He ask this? Didn't He know where Adam was hiding, and why? Of course. He asks to see if Adam will admit his wrongdoing, much as a parent does when they catch their child doing something wrong. We see what they've done, i.e. broken a vase or hurt their sibling, and yet we ask, "What have you done?"
That's the idea behind His questions. They are all asked to see if Adam and Eve will confess. I also think there's some sadness and disappointment behind the question, like when you see your child do something they shouldn't have done, especially after you've told them of the consequences if they did it. "Didn't I tell you not to bounce on the bed or you'd hurt yourself?"
A similar idea is found in Genesis chapter four, when God confronts Cain. He gives him a chance to make things right. He has not yet killed his brother. God asks him why he's sad and angry. He can still do the right thing and come to God with a pleasing sacrifice in the way God prescribed, instead of trying to come with his own best efforts. He gives Cain both a second chance and a warning, as parents often do.
"Then the LORD said to Cain,'Why are you angry? And why has your countenance fallen?" If you do well, will not your countenance be lifted up? And if you do not do well, sin is crouching at the door; and its desire is for you, but you must master it.'" Genesis 4:6,7
God tells him sin wants to control him, but he must control it. The same word is used when God curses Eve. He says "Yet your desire will be for your husband, and he will rule over you." Genesis 4:16b It's not talking about sexual desire, because that isn't a curse, but a blessing. It's talking about her desire to control in the marriage relationship, as she just did by making the decision to take the fruit without consulting her husband. Now he will rule over her, and the battle of the sexes, which began in the garden, has been in effect in every relationship since, with power struggles within marriage. But I digress.
The next time God talks to Abel, he has already killed his brother. God comes to him and asks a question He already knows the answer to,
"Where is Abel your brother?" Genesis 4:9
"He said, 'What have you done? The voice of your brother's blood is crying to Me from the ground." Genesis 4:10
So from even these few examples, we see that God is asking questions, not to obtain information from us, His creatures, but to interact with us, to fix our relationship with Him, or to judge us and remind us that we are indeed the creature and He the Creator.