Twitter knew this controversial decision would cause an exodus of conservative users and drop in stock. They did it anyway, because Trump violated their rules and ignored warning after warning.
Twitter ignored many many calls to ban Trump prior to actually doing it. Jan. 6 forced their hand.
They didn't really want to do this, but taking away President Traitor's megaphone at this tense moment in politics was 100% the right thing to do.
tl;dr it's not always about money. Over the past few months, Big Tech has found its values.