Google allows Firefox to exist (by funding Mozilla via Firefox's default search engine) only so they can point to the fact that there are alternatives, with alternative rendering engines.
It is unclear if Mastodon will actually replace Twitter. I'm skeptical. I think Twitter would have to actually fail (as in, go bankrupt, or at least have such severe technical uptime/stability issues) before the platform would be abandoned enough to definitively say Mastodon won.
ExpertsExchange -> SO mainly happened because all the decent answers on EE were hidden behind a paywall.