The first question of the Westminster Shorter Catechism famously asks what man’s chief end is: “Man’s chief end is to glorify God, and to enjoy him forever.”
Anselm of Canterbury makes a similar point at the beginning of Book 2 of Cur Deus Homo, and connects man’s rationality and original justice to this chief end, already present in his creation. Man possessed both reason and justice at the same moment in his creation in order to pursue his chief end of the enjoyment of God.
We ought not to doubt that God created rational nature just in order for it to be happy through enjoying Him. Indeed, the reason it is rational is in order to discriminate between what is just and what is unjust, between what is good and what is evil, between what is a greater good and what is a lesser good….Similar reasoning proves that rational nature received the ability to make these discriminations in order that it would hate and shun evil, and love and choose good, and more greatly love and choose a greater good [than love and choose a lesser good]….Thus, it is certain that rational nature was created for the purpose of loving and choosing the Supreme Good above all other things–loving and choosing it for its own sake and not for the sake of anything else. (For if [rational nature loves the Supreme Good] for the sake of something else, it really loves not the Supreme Good but this other thing.) But rational nature is able to do this only if it is just. Therefore, so that it would not be rational in vain, it was created both rational and just at once. Now, if it was created just in order to love and choose the Supreme Good, then it was created just either for the further purpose of one day attaining what it loves, and has chosen, or else not for this purpose. But if it were not the case that rational nature was created just for the further purpose of attaining the thing it justly loves and chooses, then its having been created such as justly to love and choose this thing would have been in vain, and there would be no reason why rational nature ought ever to attain this thing. The consequence would be that as long as rational nature would do just works by loving and choosing the Supreme Good, for which it was created, it would be unhappy; for against its will it would be in a state of deprivation, since it would not possess what it desired. But this view is utterly absurd. Consequently, rational nature was created just in order to be happy through enjoying the Supreme Good, viz., God. Accordingly, man, who is rational in nature, was created just in order to be happy through enjoying God. (Cur Deus Homo 2.1, translated by Jasper Hopkins and Herbert Richardson)