“For the ultimate end of things produced by one who works through his will is that which is chiefly and for its own sake willed by the agent. It is for this that the agent does all that he does.”
-The Compendium of Theology, Chapter 101
What is first willed by God is His own Goodness. The divine goodness, then, is the ultimate end of all things.