Law is either rigorous or it's not. When I'm told that the law is against me but gosh darn it the law is the law, I grow resentful of the "discretion" reserved for some but not others.
I'm not a lawyer so I could well be completely off base here. But if my perception is correct, I would much rather they admit that it's fundamentally up to someone's gut feeling. That's more honest than telling me that a bit of reasoning is airtight when it's not.
At some point someone needs to weigh the facts, and they are given great discretion to do so. It is generally a good thing, because we have multiple layers of appeal to prevent obviously horrible outcomes.
So this legislation, like all legislation, provides guidance for the good faith judge to help weigh the facts. There is no guidance that will prevent a bad faith judge from ruling badly: You do not need a clause about public safety to get the ruling you want, but there is an argument that your ruling may perhaps be less scrutinized.
There’s a reason an attorney’s answer is always “it depends” :) No legislation is truly airtight from abuse.
Here's the thing: this is not supposed to be a thing. Not supposed to be how things work at all, but it kind of does now.
So the trust implicit in the broad language of our laws gives - has been giving - a massive advantage to bad faith actors who obtain power.