Then, as though the one to whom he had given the part of the opponent were silent, Job himself assumes the part of the objector and asks about the causes of his punishment. First, since someone could object that God punished him as his enemy, he rejects this by saying, "Why do you hide your face and think of me as your enemy?" For it seems evil that someone regard someone else as an enemy without proof. But the only fitting cause for hostility is an offense. Thus it is evident that God thinks a man his enemy when his sins are clear. But Job had asked Him to show him his sins, and they had not ...been shown to him. So there appeared no reason why God was unfriendly to him. He insinuates this when he says, "Why do you hide your face?" as though he hated Job secretly for a hidden motive. For the face of a man who hates is uncovered when he does not hide the reason for his hatred.
Source: Commentary on Job