Some food for thought that I found in a comment on DovBear. The context is a discussion on Noah and the flood, why did G-d not know in advance that there would be a “wicked” generation that he would have to destroy if he is omniscient, and why did he create it if he knew?
Next, one can consider God’s creation of the universe as a sort of science experiment, where God is creating people with free will to see what happens. Of course, if He’s omniscient, why does He have to run the experiment? I would say that even with omniscience all you know are the probabilities of various outcomes. To actually get an outcome, you have to run the experiment. There’s a midrash that God created a large number of worlds and destroyed them. Maybe He’s still doing that, and we’re just Trial number zillion. If He doesn’t get what He wants (whatever that is), then maybe he’s trash us too.
(Comment by CA on October 7th, 2013, 5:45 PM)