Thomas Aquinas said this quote

Yet through virtuous living man is further ordained to a higher end, which consists in the enjoyment of God, as we have said above. Consequently, since society must have the same end as the individual man, it is not the ultimate end of an assembled multitude to live virtuously, but through virtuous living to attain to the possession of God.