Deterrence (legal)
In law, the term deterrence is used to describe the situation where punishment or threat is used to keep people from committing a crime. Both the person who committed a crime, as well as other people should be kept from committing that kind of crime.