Sometimes punishing someone causes them to stop doing bad things