What is the purpose of sentencing?

Over the years, the criminal sentence has served a number of different purposes, including retribution, deterrence, rehabilitation, and incapacitation