In that article, St. Thomas is arguing that there is a last end of human life. (In the next article, he argues that there is only one last end.) It's something of a reprise of the Unmoved Mover argument, but in this case what is moving is the human will rather than the entire cosmos.
St. Thomas identifies two "first movers" of the will, one "in the order of intention," the other of execution. If there's no first principle or mover in the order of intention -- which is to say, if there's nothing we want that causes us to want things -- then "there will be nothing to move the appetite." On the other hand, if there's no first mover in the order of execution, "none would begin to work at anything."
But in fact we do want things, and we do act to attain them, from which St. Thomas concludes that there is not an infinite chain of desired ends in either direction. Note that it's the forward direction that is the last end; the first principle of intention is the final end of man.
In other words, every end we actively want is linked, by a finite chain of ends ("I want this so I can have that, which I want so I can have the other thing, which I want so..."), to both a first end that we actively wanted and a last end that is the ultimate cause of us wanting all the other ends in the chain. From this it follows that the first end is linked to the last end by a finite chain.
But what doesn't follow is that the total number of ends linked to any given pair of first and last ends is finite. The first and last end are joined, not simply by a finite, linear chain of ends, but by a whole web of chains and sub-chains of ends, most of which aren't necessary to arrive at the last end. As St. Thomas put it, these non-necessary ends "are ordained to one another not essentially but accidentally." Here he's using "accident" in Aristotle's sense of something that can change without changing the essence of a thing.
One example of accidental ends he gives is this, from Objection 3: "I can will something, and will to will it, and so on indefinitely." In his reply, he explains that we know this indefinite sequence is accidental because "the will reacts on itself indifferently once or several times." In other words, it makes no real difference how many times I will my willing. I will will to will to will to will what I will if it occurs to me to do so, but whether or not it does, I still will what I will.