He expresses this as he continues, "and he said to man," namely, by illuminating himself and by communicating wisdom to him through interior inspiration: "Behold the fear of the Lord," which I am giving to you by presence, "is wisdom," because man clings to God through the fear of the Lord in whom is the true wisdom of men as in the highest cause of all things. "And to withdraw from evil," that is, from sin in which man loses God, "understanding," because understanding is especially necessary so that through understanding he may discern evil things from good ones. When he has avoided these evi...l things through the execution of good works, he attains the participation of divine wisdom. Thus because "The fear of the Lord is wisdom; and to withdraw from evil, understanding," the consequence is that the just who fear God and withdraw from evil have wisdom and understanding, which are preferred to all the earthly goods which evil men possess. So it is clear that the reasonability of divine providence is saved in the fact that spiritual goods are given to the just as better goods and temporal goods are given to the wicked as transitory.
Source: Commentary on Job