The insanity defense only applies to people who tried to act morally in response to what their delusions told them was happening. For example, the guy in Canada who decapitated someone on the bus believed he was saving the world by killing Satan. When he realized what he'd done, he was utterly devastated and begged to be killed. Someone like that really doesn't deserve to be punished. What they need is to stay in a mental hospital, which is what happens to people found not guilty by reason of insanity.