AQUINAS
Whether goodness has the aspect of a final cause? (Summa Theologica Part 1,

Question 5, Article 5, Corpus)

(Here we learn from St. Thomas that everything we do is for a good, either perceived as such or a real good. And ultimately our actions are directed to the final good, the ultimate good, God Himself!)

I answer that, Since goodness is that which all things desire, and since this has the aspect of an end, it is clear that goodness implies the aspect of an end. Nevertheless, the idea of goodness presupposes the idea of an efficient cause, and also of a formal cause. For we see that what is first in causing, is last in the thing caused. Fire, e.g. heats first of all before it reproduces the form of fire; though the heat in the fire follows from its substantial form. Now in causing, goodness and the end come first, both of which move the agent to act; secondly, the action of the agent moving to the form; thirdly, comes the form. Hence in that which is caused the converse ought to take place, so that there should be first, the form whereby it is a being; secondly, we consider in it its effective power, whereby it is perfect in being, for a thing is perfect when it can reproduce its like, as the Philosopher says (Meteor. iv); thirdly, there follows the formality of goodness which is the basic principle of its perfection.

—Selected and annotated by Dave Palmer, Guadalupe Radio Network