I think the likely reason Musk wanted to back out is the stock market shit itself and he panicked since have more trouble financing the buyout. Also twitter's stock price crashed quite a bit in 2021, so if someone imagined it'd bounce back then buying might've seemed like a pretty great move. Twitter had a high of about $77 a share in 2021. Musk's Tesla stock though was hovering over a thousand a share back in January when he started investing, then May 13th he announces the deal is on hold while Tesla was at $769 a share whose value was affecting his ability to finance the buyout.
If the buyout stayed on then Musk would lose more billions having to sell more Tesla stock.
The free speech angle seems like a way of promoting himself and what profitability he would be bringing twitter so the stock price would go up. So he gets locked in at the $54.20 joke price (420), then when memes about how the great genius Musk would quintuple the profits of Twitter come out the stock would skyrocket so he could then come out making a fortune as he sells stock from his public/private twitter (he claimed he'd do both).
But then disaster befalls The Great Musk, investors didn't believe him. If they had then they'd have been buying up Twitter stock closer to the buyout price he'd suggested, as doing otherwise would essentially be leaving money on the table. The plan to inflate the value of the Twitter stock wasn't working and his own Tesla stock was crashing in value, so no meme magic helping him to make a fortune, just Musk having to eat crow as he takes his chances with the Chancery court.
All the free speech stuff was a red herring.