Similar to the reason why we have courts of law - not for silly nonsense like justice, but so that they can be flooded with nuisance lawsuits.
“the First Amendment isn’t about freely expressing ideas and opinions”
This incident has nothing to do with free speech. There is no “idea or opinion”, expressed. Only the outing of an undercover agent in retaliation for his doing his job.