...it would be contrary to the very meaning of providence if things subject to providence did not act for an end, since it is the function of providence to order all things to their end. Moreover, it would be against the perfection of the universe if no corruptible thing existed, and no power could fail, as is evident from what was said above. Now, due to the fact that an agent fails in regard to an end that is intended, it follows that some things occur by chance. So, it would be contrary to the meaning of providence, and to the perfection of things, if there were no chance events.
[Thomas Aquinas, Summa Contra Gentiles 3.74.] The point, of course, is that there are kinds of good that are subject to chance just by being what they are, so complete good requires chance.