Job is confronted with overwhelming evidence that had him tightly backed into an inescapable corner. He is honest enough and loves truth enough that he does not even attempt to escape. With a mountain of truth and logic, God smashes Job's image of himself into a million pieces.
Job is a different person now. Something had produced a change in him between his assertion of unimpeachable integrity in Job 27:1-6 and his humble admission of vileness in Job 40:1-4. In the speech of Elihu in Job 32-37, a new line of reasoning enters the argument, and God, speaking out of a whirlwind in Job 38-41, lays Job's self-righteousness bare. God exposes Job for what he really was, despite his careful lawkeeping.