He bought Twitter because a) he's addicted to it, and b) he rushed into a buying agreement he didn't get his lawyers to vet properly (probably due to his massively inflated "I understand more than anyone else" ego).
He wanted to back out of it, but faced a lawsuit that he was almost certainly going to lose, so had no choice but to go through with the sale. The lawsuit happened because the shareholders at the time realized the company was worth nowhere close to the inflated $44 billion he offered for it, so they weren't going to back down either.
Everything else that happened after the sale is a result of a man-child feeding his addiction and recuperate from the dumb deal he was legally forced to uphold.
You are right on why he bought it. But he then got funding from outsiders who would benefit from it's transition away from effective gathering and communicating space
Just wait for the quid pro quo. SpaceX was supposed to get us back to the moon on 3 billion dollars. They are now at 5 billion dollars, and all they have to show for it is a flaming husk of a booster caught by "the chopsticks".
For anyone who thinks that was some incredible accomplishment.. NASA has been landing rovers on Mars using truly incredible engineering that makes SpaceX look like a bunch of kids eating Baby Ruth bars in the sandbox.
So if Elon gets appointed to a government position and starts awarding Tesla and SpaceX all kinds of extended taxpayer-funded gravy grift, you will know your pet theory is 100% spot on.