First and second options. Some people who literally devote 100% of their internet time to trolling are probably acting out because they don't get positive attention in real life so they take it out on strangers. And everyone knows the internet turns people into keyboard warriors, they feel safe because people can't actually come at them like if they were actually in the same room as the person. Other people just like to piss people off because they're annoying.
I troll sometimes. But usually when I do, it's kind of in a half serious/half joking kind of way. Usually it's to do with the topic of discussion, and I over-dramatize something, for example.
I don't really do it for attention. My main motivation is just I find people's reactions funny. Especially the way I do it, since I do a post 90% serious, with just one trollish sentance in the middle, so people think I'm serious about the trollish sentance aswell, which usually causes a mini-meltdown. Especially on this forum, people get so worked up about little things haha.