Let's see, an ALL-KNOWING(allegedly) God makes a bet with Satan(Gambling!well, ok he 'knows' the outcome) and basically murders(irrelevant if Satan actually does it, as he had to get permission from the big guy) Job's loved ones, and makes him suffer all to prove a point.
If a human did this people, you'd call him monstrously inhumane, and probably evil. The fact is, God doesn't answer Job's "Why?" because there IS no answer. That is the only truth that is really in that story, that there's no answer to the good man's question "why?" in the face of suffering or evil. That God ridicules a mortal who faithfully followed him, only shows the God-King concept at work, a concept so central to Middle Eastern religion.
In fact, with a few reductions in the scale of the miraculous acts in the Bible(like murdering innocent Egyptians to get one man to change his mind, THEN harden his heart even though God could simply teleport the Hebrews out of Egypt) you could replace "God" with Hammurabi or Sargon or Akhenaton.
This is the problem. All you have to support your theory......is your own wishful thinking, (vain imaginations) which doesn't hold truth. In your limited knowledge of God's persona; you try to gauge His intentions and thoughts on a flawed, human level.