Imprisonment is the worst punishment possible. I don't mean it's the biggest punishment. I mean it's the evilest. No matter what the wrongdoing is, any other form of punishment is always superior.
Just compare it to the simple method of beating the criminal up, and think about the effect your punishment has on the criminal in each case. Nobody likes pain, but bad people are more averse to it than good people, because good people have something bigger to care about, whereas to a bad person, the most important thing is themselves. The exact opposite is true of freedom. Pursuing freedom is a trait of good people, which means when you take it, you're punishing the virtue in someone, whereas when you beat them up, you're punishing the vice in them because pursuing pleasure above freedom is a trait of badguys. Another way to look at is this: if a criminal in jail repents, they want to go out and do good and redeem themselves. But they can't. That means the more they repent, the more they suffer. What a fucked up system.
There are other reasons why imprisonment is worse. One is that when you put someone in a cage, you're stopping them from working, which means they can't support themselves and taxpayers are forced to feed them. For fuck's sake whose idea was it to punish criminals by turning them into even more of a drag on their victims. (It is important that the taxpayer's anger here should be directed at the government, not the criminals.) Then there's the reason of increased collateral emotional damage: if you put a criminal in jail that has a spouse and kids, you're punishing them too by taking their loved one from them. Even their employer suffers. But if you just beat the criminal up or even better, take their property to give it to the poor or to the victim, those around them don't suffer as much.