Because the police said so.
That's it, that's the reason, and here's why it's legally unassailable.
You're free to, on your own time, blather on about the Constitution and freedom of association and speech and expression and whatever the hell you like, but if, at some point, you are approached by an agent of the law, and told clearly and unambiguously that you are now breaking the law, then you are, in fact, breaking the law. Put another way, if you're told that your gathering is illegal, then it is illegal, and no one is interested in your legal grandstanding. You're welcome to argue all that later if you want, but at that moment, you're breaking the law, which is why hearings for all these suspended truckers should go something like this:
"So, were you told to leave or you would be arrested?"
"And did you leave?"
That's it -- if a police officer orders you to do something, and you don't do it, well, you're screwed. That's how it works. And that's why all those truckers should right now be looking for another line of work.