Because, as I have said, God wills the virtue of the saints to be known to all, both the just and the wicked, it pleased him that as all saw Job's good deeds that his right intention should also be clearly shown to all. So he willed to deprive Job of his earthly prosperity, so that when he persevered in the fear of God, it would become clear that he feared God from a right intention and not on account of temporal things. Note that God punishes wicked men through both the good and the wicked angels, but he never sends adversity on good men except through wicked angels. So he did not will that a...dversity be brought on blessed Job except through Satan, and because of this the text continues, "And the Lord said to Satan: Behold, all that he has is in your power," that is, I surrender it to your power, "only do not extend your hand to him." From this text we are clearly given to understand that Satan cannot harm just men as much as he wants, but only as much as he is permitted to do so. Consider also that the Lord did not command Satan to strike Job, but only gave him the power to do so, because, "The will to do harm is in each wicked person from himself, but the power of harming comes from God."
From what has been said already it is clear that the cause of the adversity of blessed Job was that his virtue should be made clear to all. So Scripture says of Tobias, "Thus the Lord permitted him to be tempted so that an example might be given to posterity of his patience, like blessed Job." (Tob. 2:12) Be careful not to believe that the Lord had been persuaded by the words of Satan to permit Job to be afflicted, but he ordered this from his eternal disposition to make clear Job's virtue against the false accusations of the impious. Therefore, false accusations are placed first and the divine permission follows.
After the cause of blessed Job's adversity has been considered, the text shows as a consequence how such adversity came upon him. Because all the adversity was produced by Satan, the text therefore speaks about him first saying, "So Satan went forth from the face of the Lord," as if to use the power permitted to him. It is expressly stated, "He went forth from the face of the Lord," for Satan is in the presence of the face of the Lord in that the power of harming someone is permitted him because this happens according to the reasonable will of God but when he uses this power permitted to him, he goes forth from the face of the Lord, because he turns away from the intention of the one giving him permission. This is apparent in the case in question: for he was permitted by God to harm Job to make Job's virtue clearly known. However, Satan did not inflict him for this reason, but to provoke him to impatience and blasphemy.
At the same time, what we said above appears clearly true in this text. Satan came to present himself among the sons of God assisting in his presence in the sense that some are said to assist in the presence of God who are subject to divine judgment and examination, not in the sense that they assist in the presence of God who see God. So here the text does not say Satan cast God away from his face, but that, "he went forth from the presence of God," as though he turned away from the intention of his providence, although he was not strong enough to escape the order of providence.
Source: Commentary on Job