4 But the Divine Scripture and the doctrines of the truth know but One God, who rules all things by His power, but endures many things of His will. For He rules even over the idolaters, but endures them of His forbearance: He rules also over the heretics who set Him at nought, but bears with them because of His long-suffering: He rules even over the devil, but bears with him of His long-suffering, not from want of power; as if defeated. For he is the beginning of the Lord's creation, made to be mocked, not by Himself, for that were unworthy of Him, but by the Angels whom He has made.
But He suffered him to live, for two purposes, that he might disgrace himself the more in his defeat, and that mankind might be crowned with victory. O all wise providence of God! Which takes the wicked purpose for a groundwork of salvation for the faithful. For as He took the unbrotherly purpose of Joseph's brethren for a groundwork of His own dispensation, and, by permitting them to sell their brother from hatred, took occasion to make him king whom He would; so he permitted the devil to wrestle, that the victors might be crowned; and that when victory was gained, he might be the more disgraced as being conquered by the weaker, and men be greatly honoured as having conquered him who was once an Archangel.
Source: Catechetical Lectures (New Advent)