I can understand why they have done it having read about why.
there's some stuff on wikipedia about how it works in Norway:
""In Scandinavia, insanity is not a defense; instead, it is the responsibility of the court system as such to consider whether the accused may have been psychotic or suffering from other severe mental defects when per...petrating the criminal act. This explains why, in Norway, the court considered the sanity of Anders Behring Breivik, even if he himself declared to be sane.
Rules differ between Scandinavian countries.
In Sweden, psychotic perpetrators are seen as accountable, but the sanction is to forensic mental care[25] .
In Denmark and Norway, psychotic perpetrators are declared guilty, but not punished. Instead of prison, they are sentenced to mandatory treatment. Still, important differences exist between Norway and Denmark.
In Norway, §44 of the penal code states specifically that "a person who at the time of the crime was insane or unconscious is not punished"[26] . The use of the word 'psychotic' is the reason why Anders Behring Breivik would automatically have been given a treatment order by the court, if the (very unusual) second psychiatric report had been in concordance with the first report."
And an interesting article here