Comment by coredog64
You're missing a function: Removal. Locking up criminals prevents them committing additional crimes that impact the general public. Data from the last few years shows that there's definitely a Pareto aspect to criminal populations, and absent an ability to rehabilitate, removal is the next best option for society at large.
I would argue that removal can be analyzed into the other categories, or into something that isn't the province of punishment.
1. the deprivation of freedom is retributive
2. the prevention of additional crimes can be said to be deterrence of an active sort
3. the protection of society isn't part of punishment per se, but a separate end
This becomes clear when we consider imprisonment in relation to various crimes. Violent criminals are imprisoned in part because they are a threat to the physical safety of others. However, is an embezzler or a mayor embroiled in shady accounting a threat to anyone's physical safety? Probably not. So the purpose of their removal is less about crime prevention and more about retribution.