Two of the purposes of prison are rehabilitation and punishment.