As a society, we have always been quite skeptical of the notion of insanity as a defense to a crime. This is understandable because the action and the results are entirely the same whether the accused was sane or insane at the time. But, I believe that most people do accept that people who wander around discussing current events with the pidgeons probably do have some problems.
Our jurisprudence is based on the notion that the accused must be guilty (morally culpable) knowing that his or her actions were wrong (illegal) and acted any way. If someone's perceptions of reality are screwed up that he or she can't tell that an act is wrongul, they shouldn't be held criminally responsible.
However, if someone is found not guilty by reason of insanity, they don't get a pat on the back and busfare back home. Instead, they are sent to a mental hospital. How long they stay depends on the severity of their illness and whether or not they respond to treatment. Some stay for life, but most stay for years and years.
Modern psychotropic medications can do wonders to ameliorate their symptoms. When they are released, they are kept on short leashes and can be thrown back in the hospital if they fall off their meds.
It isn't perfect, but it is a decent, humane system. The idea of punishing the non-morally culpable is repugnant to the basic beliefs which underlie our entire notions of justice.
http://en.wikipedia.org/wiki/Insanity_defense