Sometimes a child is born with a very nasty nature, and even the best of families can do little to change this. Nurture and nature always interact, but nature often wins.
There is no real answer, but it must be dreadful for the family. I hope the lad is monitored and studied while in jail, so that psychiatrists can learn from his condition and perhaps one day there will be a way of diagnosing and treating whatever he has in his brain and psyche that caused this.
I know that a lack of empathy is sometimes behind such things, and to develop empathy needs imagination. Watching violent videos and playing violent games dominate a child's thoughts, leaving no room for imagination. A child needs to be bored sometimes, and left to their own devices without artificial stimulation.
My son teaches 15 to 18 year old high school students and reckons imagination or lack of it is behind good or bad behaviour.