Your average murder will only kill once or twice. Your average rapist is a lifetime offender. If you put a murderer to death, you do it for vengeance/justice. If you put a child rapist to death, you not only punish someone who has destroyed a life, but you save many people from the fate of becoming the offenders future victims.
It is never ok for the courts to ban something on the grounds that "they know better than us", and/or "hard decisions belong in their hands, not ours". They are representatives of the peoples justice. Cutting the people out of the decision making loop, for any reason, is wrong. Even if you reason is "but making decisions is so darned hard on the people". The reasons matter as much as the results.