Cur Deus Homo, I-XIV
From Saint Wiki
Cur Deus Homo
How the honor of God exists in the punishment of the wicked.
Boso. But I wish to hear from you whether the punishment of the sinner is an honor to God, or how it is an honor. For if the punishment of the sinner is not for God's honor when the sinner does not pay what he took away, but is punished, God loses his honor so that he cannot recover it. And this seems in contradiction to the things which have been said.
Anselm. It is impossible for God to lose his honor; for either the sinner pays his debt of his own accord, or, if he refuse, God takes it from him. For either man renders due submission to God of his own will, by avoiding sin or making payment, or else God subjects him to himself by torments, even against man's will, and thus shows that he is the Lord of man, though man refuses to acknowledge it of his own accord. And here we must observe that as man in sinning takes away what belongs to God, so God in punishing gets in return what pertains to man. For not only does that belong to a man which he has in present possession, but also that which it is in his power to have. Therefore, since man was so made as to be able to attain happiness by avoiding sin; if, on account of his sin, he is deprived of happiness and every good, he repays from his own inheritance what he has stolen, though he repay it against his will. For although God does not apply what he takes away to any object of his own, as man transfers the money which he has taken from another to his own use; yet what he takes away serves the purpose of his own honor, for this very reason, that it is taken away. For by this act he shows that the sinner and all that pertains to him are under his subjection.