Early civilizations didn't seem to have this same notion of all powerful all knowing deities that we have now, once the gnostics lost.
For example, in the bible we have humans "wrestling" with angels all night. At the end of the evening, after apparently just toying with Jacob for hours to see if he would keep fighting (have you ever fought another man for any period of time - anymore than a few minutes for ANYONE is exhausting) he touched him on the hip and lamed him. It was like he just suddenly remembered that he was supernatural. We've got wars going on in "heaven", between beings that apparently can't be harmed.
etc
etc
God chats with ADam in the breezy part of the day. I think it's off-base to claim that God asked where they were because he wanted them to fess up - no, this is just another example of the humanization of the God the bible writers created. He is their "best guess". And he wears alot of different hats.