The primary purpose of punishment is to teach. The need to change their behavior in a way that was pretty good, chastened and do not behave like that again.
The punishment is intended primarily for teaching them. By the behavior modification in a way that good and right to sober up and do the behavior like that again.