2. Whenever there is due order to an end, that order must lead to the end, and departure from that order must shut out the end: for things that are according to an end derive their necessity from the end, in such way that they must be, if the end is to follow, and while they are without impediment, the end ensues. But God has imposed upon men's acts an order in respect of their final good. If then that order is duly laid down, it must be that they who walk according to it shall gain their final good, that is, be rewarded, and they who depart from that order by sin shall be shut out from their final good, that is, punished.
3. As physical things are subject to the order of divine providence, so also human acts. In regard to both the one and the other the due order may be observed, or it may be transgressed. But there is this difference, that the observation or transgression of the due order lies in the power of the human will, but not in the power of physical things. As then in physical things, when due order is observed in them, there follows of natural necessity their preservation and good, but their destruction and evil when the due and natural order is departed from; so in human things it needs must be that when a man voluntarily observes the order of law by Heaven imposed upon him, he gains good, not of necessity, but by the dispensation of the ruler, -- that is to say, he gains reward; and conversely, when the order of law is neglected, he comes to evil, that is to say, is punished.
4. It is part of the perfection of God's goodness to have no part of nature in disorder. Hence we see in the physical world that every evil is part of an orderly arrangement to some good, as the killing of the sheep is the feeding of the wolf. Since then human acts are subject to the order of divine providence as well as physical events, the evil that happens in human acts must lead up in an orderly way to good. But this is most aptly brought about by the punishment of sins: for thus excesses beyond the due amount are embraced under the order of justice, which restores equality. Man exceeds the due degree and proper amount by preference of his own will to that of God, satisfying himself against the ordinance of God: this inequality is removed by his being compelled to suffer something against his will according to the same ordinance.
6. Divine providence has arranged things so that one shall profit another. But it is most fitting for man to be advanced to his final good as well by the good as by the evil of his fellow-man, being excited to do well by seeing well-doers rewarded, and withheld from evil-doing by seeing evil-doers punished.
Hence it is said: I am the Lord thy God . . . . visiting the iniquities of the fathers upon the children . . . . and doing mercy a thousandfold upon them that love me and keep my commandments (Exod. xx, 5, 6): Thou wilt render to every one according to his works (Ps. lxi, 13): To them who, according to patience in good work, seek glory and honour and incorruption, life everlasting: but to them who . . . . obey not the truth, but give credit to iniquity, wrath and indignation (Rom. ii, 7, 8).*
3.140 : That neither all Good Works nor all Sins are Equal
3.142 : Of the Difference and Order of Punishments