That's called hallucinations, a symptom of many things such as schizophrenia; a disorder which does affect one's ability to tell fantasy from reality and right from wrong.
A characteristic of sociopathy is the ability to tell the consequences of one's actions, but to ignore them. This is exactly why he is sent to prison. He knew exactly what he was doing when he executed those three boys, the same way he chose to taunt their families in court. This fucker deserves absolutely no sympathy.