Imprisonment has three purposes:
- rehabilitation
NO. People have the right to believe whatever they want to believe. If you believe that using or selling drugs should be legal, no amount of prison time should ever be used in a "well if you confess to believing X we'll go easy on you". This is the shit that the catholic church did to Galileo. We don't need to be repeating it, no matter how holy you think US law might be.
NO. The only person responsible for your protection is you. No jury should ever feel like "well he might not be guilty, but I'm going to vote guilty anyway just to protect society". The juror should be thinking "he might not be guilty, and if I'm wrong then it's not the court's responsibility anyway".
NO. We do not enact "eye for an eye law".
The ideal purpose for prisons, as much as you might not like it, is to protect prisoners from the wrath of those who have been hurt. Rather than a mob hanging someone for stealing a horse, we insist on them having a trial and an appropriate "time out" long enough for everyone to stop wanting to kill the offender. There can always be other reasons, and a mix of pros and cons, but this is the main reason. Prisons create order in society by creating equal responses for equal crimes, rather than random mob anger.