*If* he was bullied to that point then he could have been trying to show them what they did to him. Point is they possibly caused him mental distress and he just did it back to them. Though he took it to an extreme and probably effected more than those that effected him.
I'm not trying to make excuses for him as what he did fucked up a lot of peoples lives in a very permanent manner, just taking a second to try to see the world through his eyes.