5. Whoever strives to defend himself against the scourges of God, endeavours to set aside the judgment of Him Who inflicts them. For when he says that he is not smitten for his own fault, what else does he but accuse the injustice of the Smiter? The scourges of heaven therefore smote not blessed Job to extinguish in him his faults, but rather to increase his merits, in order that he who in the season of tranquillity had shone forth in so great sanctity, might also manifest from the blow what virtue of patience lay concealed within him. But he, not detecting his fault during the scourges, and yet not discovering that those very scourges were the cause of increasing his merit, believed that he was unjustly smitten, when he found nothing in himself which required to be corrected. But, lest his very innocence should be puffed up into the swelling of pride, he is reproved by the Divine voice; and his mind, free from iniquity, but weighed down by scourges, is recalled to the secret judgments...
Either he speaks here about his present intervention, as if to say, “I do not speak so in order to condemn you but to show that you are righteous”; or he wants to speak about his trial by calling intervention his approval. This means, “Do not think that I managed things in this manner for any other reason.” He did not say, “In order that you might be righteous” but “that you might appear to be righteous,” as you actually were, so that you might teach others. Finally, he may want to speak about his present intervention, as if to say, “If I said it, it is in order that you might appear to be righteous after the words that I had expressed, not in order to condemn you.” Then he places again before him his power and his hatred for the wicked, because I am not only powerful, he says, but I act and use my power against the wicked. - "Commentary on Job 40.8"