If neuroscience proves the brain compelled the act, punishment is just revenge on broken wiring. Fix the wiring through rehab — it actually prevents the next victim.
Rehab also cuts long-term costs by turning offenders into workers instead of lifelong inmates draining resources.