Aquinas holds in ST I-II q.87 that punishment is just only insofar as it restores the order violated...