Most international, non-EU students are on “tier 4” student visas. If you are on this type of visa, your “leave to remain” can be curtailed (you lose this status and must leave the country) for many reasons and the Home Office has very broad discretion in deciding when to do so.
The verbatim text says that someone’s leave to remain can be curtailed because of
“the undesirability of permitting the person concerned to remain in the United Kingdom in the light of his conduct … character or associations or the fact that he represents a threat to national security.”
This can be used against protesters. It’s not democracy but that should come as no surprise.
Another thing to bear in mind is that your immigration status is based on you being a student. If you lose this status because the university decides to expel you (based on their internal disciplinary rules), you are also losing your visa (if you cannot transfer to another institution which can sponsor your visa).