Twitter is a company, not a court of law. Trump tarnished their reputation like nobody else, so they ceased doing business with him when it was convenient. This was facilitated by him flagrantly violating their rules for years, culminating in the riot he incited via their platform. It's as simple as that.