To clarify, the students were doing so during school hours, presumably on school property, possibly even using the school Internet connection or school computers.
I can't comment on this specific school district, but in my own school district, there have been a fair number of instances where it was discovered, after an incident, that students had been planning a fight or physical confrontation for days in advance on social media. If the district had programs like this in place, it could have actually improved student safety. I know many here are claiming that this is just a pretense for monitoring students, but that's not what it looks like from my perspective.