What's interesting is that despite how terrifying prison is (I once witnessed a man hysterically plead with a judge not to send him to prison) it still doesn't seem to act as much of a deterrent.
It's not meant to be a deterrent to criminals, it's meant to keep regular people in line. It's very effective at that. This is why my suggestion that crimes committed against prisoners should be prosecuted produced such a harsh reaction.