Prevention is different from deterrence, because deterrence means that a person who would be committing another crime thinks to themselves, "Well, I won't do that because the penalty is such and such." I agree, that doesn't always hold true, and there are categories of offence to which that is not a realistic expectation.