You're right, God's final speech to Job is troubling. The issue raised thematically is, of course, the question of justice and while God has no hesitation defending his justice in other parts of the Bible (Psalms, for instance), that doesn't happen here. Instead, as Jack Miles points out in his book, "God, A Biography," "The deity rises to his full majestic stature, drawing the robes of creation around him and regally changes the subject." You might find his treatment of the God of Job rather gratifying.
Miles also asserts that Job catches on, he's not fooled. The traditional translation of Job's response, "now my eye sees thee, therefore I despise myself, and repent in dust and ashes," is, according to Miles, a mistranslation, since "myself" was added to LXX as the object for the transitive verb "despise". He proposes that what Job feels sorry for isn't himself but humanity, and that a more accurate translation might be "Now that my eyes have seen you, I shudder with sorrow for mortal clay."