In the end, legitimacy is decided by the country as a whole. In a well-working country, laws, courts, and police are a reasonable proxy for that.
Incidentally I had not read about bill 78. The anti-protest portions of the bill I am strongly against. But the tuition hikes that were being protested, well, I was paying more tuition 20 years ago in British Columbia, Canada than Quebec students would have paid. I have little sympathy with the student protests about tuition. Furthermore I am personally of the political belief that the culture of widespread entitlement in Quebec is among the reasons that it is much worse off economically than the rest of the country.
Note, this is coming from someone who, while I was in Canada, was politically fairly far to the left. And Canada is fairly far to the left of the United States. This is not the time or place to debate it, but in the case of Quebec my opinions are shaped in part by the separatist movement there. I grew up with friends whose families left Quebec due to Bill 101, which is likely the most racist law passed anywhere in North America in my lifetime. Before objecting, go read it, and educate yourself on why the Bank of Montreal is now headquartered in Toronto, and what economic impacts that has had on Montreal.
It didn't help that the value of my Canadian sourced scholarship dropped sharply due to the the widespread belief in Quebec during the early 90s that they had the right to take not only their marbles, but all of the marbles that they had been given while abandoning all of the debts that they had run up, on a straight majority vote. (One of those marbles being a lot of land with good hydroelectric power, built on land given under the condition that they take good care of the natives, with natives who voted 99.7% that if Quebec left Canada, they would leave Quebec.) Yes, I am sure that you see things differently and think that Quebec was entitled to do that. But explain to me why the natives were not entitled to leave Quebec, and find an argument that cannot be turned around and be seen by a third party as an argument that Quebec not be allowed to leave Canada.