Finally, he expresses the words which he asserts were revealed to him when he says, "Can mortal man be righteous before God?" He introduces these words to confirm his opinion which he already touched on (v. 7), namely, that adversities do not happen to someone in this life except because of sin. He introduces three reasons to prove that no one can excuse himself when he suffers adverse things asserting that he is free from sin. The first of these is taken from a comparison of man to God and leads to an impossible conclusion. For if man is punished by God without being at fault, it follows that... man would be more just than God. The work of justice is to give each one his due. So if God should inflict punishment on someone who was innocent to whom punishment is not due, but the man who suffers because of God did not inflict punishment on another man without fault—which would follow necessarily if the one punished by God were innocent—it follows that a man punished by God is more just than God. To justify man compared to God is tantamount to justifying him with respect to God under the aspect of justice. As perhaps this might not seem an unfitting conclusion to someone, he carries the argument to another more apparently unfitting conclusion saying, "Can a man be pure before his maker?" Each thing has purity in that it conserves its own nature which it receives from its own causes. So the purity of each effect depends on its cause, and it cannot surpass its cause in purity. Thus a man cannot be more pure than his Creator, who is God.
Source: Commentary on Job