I acknowledge it's a dick move, but it really is just a spoiler for a book, not exactly life ruining and really shouldn't even be day-ruining. I had the book spoiled for me too and it was just something I moved on from, somehow.
These were people who lined up for hours outside of a bookstore still waiting to get in after midnight. Many of those people were young and the lack of perspective and experience at young ages often results in assigning a disproportionate weight to the emotional events they experience. An event like that might not have been day-ruining for you, but I have no doubt that there were people who were genuinely hurt by it.
This was done because it was the easiest way to massively distribute pain to people about a known weak spot. It was mean spirited, anti-social, and honestly indefensible.
If it isn't what's the defense?
Elsethread, you mention that "some people really got upset.". In some sense, the more upset they get, the more successful the troll and the funnier it gets, right? At least, it feels funny to me, at the same time as it also feels bad to imagine upset kids, at the same time as feeling that upset kids learning that other humans are cruel is a necessary part of growing up.
The question of whether humans are more biased towards social or antisocial behavior[1] is a complex one that philosophy has struggled with for a long time without a clear consensus.
1. Often historically framed as whether humans are inherently good or evil.
Assholes do exist, and you should be aware of them, but assholes are a tiny minority of the population. There are far more people who aren't assholes, and an even greater number of people who are just doing their own thing and can't be bothered to go through the effort to hurt others just for kicks.