This is the rejoinder to those who defended them by saying "they're a private platform, they can do whatever they want". And I actually agree with that. But in spheres of life without explicit legal protections, people will come to rely on informal reputation and cultural norms.
Twitter is learning the hard way about why companies jealously guard their reputation for fairness and neutrality. Taking a public and divisive stand on the culture war issue du jour is rarely smart business. Like many tech darling Icaruses, Jack Dorsey probably thought the time-tested rules of business didn't apply. Watching 10% of his company's value vaporize in a few days was a hard way to learn that's not true. Hopefully $5 billion was worth it to keep attending Bay Area cocktail parties.
At the end of the day Twitter has wrecked its reputation as a fair and neutral platform. It will take at least a generation to repair. A consequence of this will be that in situations like Uganda, nobody will afford it the benefit of the doubt any more.
It's unfortunate that a major political movement in the US has aligned itself in support of those two things, but having done so, it forced Twitter's hand.
It turns out that once you shut down the leader of the world's largest empire, every tinpot thug who fears losing their ability to control their citizens will shut down access to your platform. Whoda thunk? It has nothing to do with right and wrong and everything to do with realpolitik.
I can confidently say that it would have happened anyways, because banning Twitter and Facebook has already been used, multiple times, by various governments in an attempt to illegitimately retain power.
The only Pandora's box that has been opened is one of domestic American politics... And that lid was popped open ~5 years ago. You can't easily put that genie back in the bottle, now.