Why do some people spam?

Why would they spam?
Are they trying to ruin our fun?
An idle mind is the devil's workshop
https://www.chess.com/forum/view/off-topic/im-bored-2
Spamming is either by bots for various reasons (usually some petty money making), or by some mentally limited persons or smaller kids, who find "the more advanced" trolling or flaming to be above their capabilities. Trolling on the other hand I believe is closely related to the mood of the persons that do it. Usually frustrated people who think they cant get themselves out of their misery, so they need to vent out somewhere.
http://theconversation.com/our-experiments-taught-us-why-people-troll-72798
https://www.bbc.com/news/magazine-14898564
There can be more positive trolls, the ones that are kinda having fun, poking around and generally having a more positive view on things, having a laugh about stuff, nothing important in most cases. They understand their misery but are able to roll it in with some more clever and positive runabouts. They are less mentally pressured and are more creative. And there are negative ones, the ones that are toxic, maybe turn evil in some more extreme cases. Negative ones are usually some kind of sociopats as well, where positive ones are usually not. But I believe both of the types have some sort of soul ache, they just deal with it differently.