Be careful! Aquinas does not use ‘chance’ in the way we do now.
Chapter 39 That the distinction of things is not from chance(alternate translation)
1 HAVING disposed of those matters which relate to the production of things, it remains for us to treat of those which call for our consideration as regards the distinction of things. Of these the first that we have to prove is that the distinction of things is not from chance.
2 For chance occurs only in those things which it is possible to be otherwise, since we do not ascribe to chance those that are necessarily and always. Now it was shown above that certain things have been created in whose nature there is no possibility of not being, such as immaterial substances and those which are not composed of contraries. Wherefore it is impossible that their substances be from chance. But it is by their substances that they are mutually distinct. Therefore their distinction is not from chance.
Notes “Chance”, as Aquinas uses it, deals only with the contingent, which are things “which it is possible to be otherwise.”
3 Moreover. Since chance is only in those things that are possibly otherwise, and since the principle of this possibility is matter and not their form, which in fact determines the possibility of matter to one; it follows that those things which are distinct by their forms are not distinct by chance, but perhaps those things are, whose distinction is from matter. But the distinction of species is from the form, and the distinction of singulars in the same species, is from matter. Wherefore the specific distinction of things cannot be from chance, but perhaps chance causes the distinction of certain individuals.
4 Also. Since matter is the principle and cause of casual things, as we have shown, there may be chance in the making of things produced from matter. But it was proved above that the first production of things into being was not from matter. Wherefore there is no place for chance in them. Yet the first production of things must needs have included their distinction: since there are many created things which are neither produced from one another, nor from something common, because they do not agree in matter. Therefore it is impossible for the distinction of things to be from chance.
Notes Matter takes on form. The same matter can (often) be refashioned into other forms. The forms themselves cannot be from chance. The accidents which are not essentially to a thing instantiating a form can be “from chance.” A red car and a blue car are both cars, and the color could be by “chance.” This leads to the next arguments.
5 Again. A per se cause is before an accidental cause. Hence if later things are from a determinate per se cause, it is unfitting to say that the first things are from an undeterminate accidental cause. Now the distinction of things naturally precedes their movements and operations: since determinate movements and operations belong to things determinate and distinct. But movements and operations of things are from per se and determinate causes, since we find that they proceed from their causes in the same way either always or for the most part. Therefore the distinction of things is also from a per se determinate cause, and not from chance, which is an indeterminate accidental cause.
6 Moreover. The form of anything that proceeds from an intellectual voluntary agent is intended by the agent. Now the universe of creatures has for its author God Who is an agent by His will and intellect, as proved above. Nor can there be any defect in His power, so that He fail of His intention: since His power is infinite, as was proved above. It follows therefore that the form of the universe is intended and willed by God. Therefore it is not from chance: for we ascribe to chance those things which are beside the intention of the agent. Now the form of the universe consists in the distinction and order of its parts. Therefore the distinction of things is not from chance.
7 Further. That which is good and best in the effect is the end of its production. But the good and the best in the universe consists in the mutual order of its parts, which is impossible without distinction: since by this order the universe is established as one whole, and this is its best. Therefore the order of the parts of the universe and their distinction is the end of the production of the universe. Therefore the distinction of things is not from chance…
9 Hereby is excluded the opinion of the ancient natural philosophers who affirmed that there was only a material cause, and no other, from which all things were made by expansion and cohesion. For these are compelled to say that the distinction of things which we observe in the universe resulted, not from the intentional ordinance of one, but from the chance movement of matter.
10 Likewise is excluded the opinion of Democritus and Leucippus, who postulated an infinite number of material principles, namely indivisible bodies of the same nature, but differing in shape, order, and position, to whose convergence–which must needs be fortuitous, since they denied the existence of an active cause–they ascribed the diversity among things, on account of the three aforesaid differences of atoms, to wit, of shape, order, and position: wherefore it followed that the distinction of things was by chance: and from what has been said this is clearly false.
Notes So what is “chance”, then? Not a thing, not a cause; rather it is the effect of unanticipated, or rather accidental causes. Argument 9 is still compelling to moderns, but only because they believe, or implicitly accept, chance is ontic. Saying something is “caused by chance” is to give up saying what actually caused the thing.
It takes something actual to actualize a potential, and actualities can only operate insofar as they have powers, and these powers are not (on earth) absolute; they have restrictions. Thus there can’t be “chance” as an actual thing. It is only epistemological.