Just now it occurred to me that optimizing a social network for engagement is almost precisely the same thing as trolling: showing people the things that are most likely to react strongly to.
The only difference is that trolls write their content themselves, while social networks promote content written by others.