A ban on a social media site is something done by a private party, not a function of the justice system.
So yes, bans can be done without any legal action. And really that's how it should be for the sake of proper function.
Otherwise I could just spam HN over and over, until HN actually managed to sue me and win the lawsuit. Can you imagine how long that would take?
Mind you, spam is very much free speech, so it'd be interesting to see which law that would be breaking.