Not guilty by reason of insanity is a really hinky area. The idea behind it is that if someone could not understand what they did was wrong, or even that what they were doing was real, then punishing them is useless. The whole idea is that without a "guilty mind" it is unfair to punish someone for something they could not have prevented.
The defense is a lot harder to get in America since the early '80s, when John Hinckley successfully got off after attemtpting to assassinate Reagan. Probably good that it's harder to argue this now, as a lot of people were successfully using it in some hinky circumstances. It's easier to successfully argue NGRI in Canada and Europe.
As for this guy getting out in 10 or 20 years, he will be in a mental institution until the point that they decide that he could stand trial. If that never happens, he never gets out. If they decide he is capable of standing trial, then he goes to trial and the whole "insanity" thing doesn't apply.
As for the "man, I'd have gone right up to him and taken the knife away if I'd been there argument", it's really easy for an armchair quarterback to say that. The natural response to something that gruesome is going to be to get the berkeley away from it. People who would run back and try to stop the attacker in that situation are rare, brave, and foolish.