To be rational, we want to choose our goals wisely, and then act rationally and without emotion when it comes to the pursuit of those goals. Personally, my goal for the criminal justice system is not merely to minimize crime, but to ensure that justice is done.
In my opinion, if someone intentionally rapes and kills a child, for example, it is a positive good to remove them from existence. You simply do not get to commit such an act and remain on earth with the rest of us. If we lock such a person up forever, that is good. If we kill them, that is even better. To me, that's what justice means.