Secondly, he proves what he had said by citing two authorities: the first of these is from Jb (5:13); hence he says: He catches the wise in their own craftiness. Now the Lord catches the wise in their own craftiness, because when they lay crafty plans contrary to God, He frustrates them and fulfills His own plan. Thus, by the malice of Joseph's brothers attempting to prevent his ascendancy, it came to pass by divine providence that Joseph, after being sold, became a ruler in Egypt. Hence just before the words quoted, Job says: "He frustrates the devices of the crafty, so that their hands achie...ve no success"; because, as it says in Pr (21:30): "No wisdom, no understanding, no counsel, can avail against the Lord." The second authority is taken from Ps 94 (v. 11); hence he says: and again it is written: The Lord knows that the thoughts of the wise, i.e., according to the wisdom of the world, are futile, namely, because they do not reach unto the goal of human knowledge, which is the knowledge of divine truth. Hence Wis (13:1) says: "All men who are ignorant of God are foolish."
Source: Commentary on 1 Corinthians