@eldritch48 there's a lot to be said about what punishment is for; arguably in practice it is indeed largely intended to be a deterrent (when not, worse, just for the sadistic satisfaction of whoever inflicts the punishment), but it can also be (again, in theory) intended to be a way to have compensation (at a personal or communal level, depending on what one is being punished for), and/or education.