IMO Facebook/WhatsApp were totally in the right here: they were not issued any legal documents or binding court orders, saw that their systems had been compromised, and therefore informed _all compromised users_ without discrimination.
Really though, using "terror suspect" here is like crying "think of the children": it's sensationalist garbage designed to drum up public support through fear. This is the same old e2e encryption vs. overstepping law enforcement debate, but with the kinky old "what about terrorism" mixed with the currently fashionable "boo Facebook and other tech giants" angle.
Basically, Facebook did something (which I believe was) ethical and law enforcement agencies employing covert tactics that skirt the well-established legal processes got caught with their pants down.