The internet allows for some to be whatever they want to be, even with nefarious purpose. For some, it's just an outlet, a way to go unchecked and behave in a manner unbecoming of their usual self. I can assure you that these trolls would not have the fortitude to display these traits in public. They, like all bullies, hide behind a shield, and like all bullies the actions they commit are generally more a reflection of them than the target. For the most part, they are only trying to get a rise out of people and since some respond, ignite the fires and off goes the comment string. The best practice is to not address negative or aggressive comments. I know, can it be that easy? Yes. The internet is two fold here, a place to bully unchecked and the opportunity to ignore it and move on unhindered. They will go away once they see that the intended effect does not get to you and find a more vulnerable target.
It would stop if people stopped answering them
In short; they are virtual bullies who have their own issues and they project them on others to compensate for feelings of isolation and insecurity. Ignoring them makes them bored and they will move on.