People are given punishment in the hopes of not repeating a crime