The reason is very simple. Most of the trolls are nerds, and so they never get laid. Because of sexual frustration they decide take it out on someone by trolling. So trolling stems out of nerd sex denial. Sigmund Freud has explained the critical role sex plays in human psychology; even all wars & bloodshed that happens is in one way or the other connected to sex. In the end, its darwinian instinct.