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.
This is tautological.