If Twitter won't provide the details on the number of spam bots then surely any case they bring is going to be weak?
As dlockers says, he appears to have refused the offer to the standard pre contract stage due diligence, agreeing to go with the figures Twitter had told the US financial regulators. Twitter aren't stupid enough to give the US government false figures, but they may have used a method of working it out that Musk doesn't like but is perfectly sound and legal and Musk didn't understand because he's not a lawyer.
Wording in contracts is very important, and it looks like either Musk or his lawyers didn't understand some of what they were agreeing to* or the lawyers did, but Musk overruled them.
If Twitter says to the financial/shares regulator in the US "We have an estimated 5% active accounts that are bots" that might mean one thing to Musk ("active, hey that's accounts that post!"*) or it might mean another thing to Twitter (active = logs in, navigates around twitter in any way*).
It's like the deal Musk appears to have signed where it's looking worse for him personally than originally reported, as he may be on the hook personally for either buying the company at the agreed price or paying damages that are basically the difference between Twitters current market value and what Musk had said he would do. All due to the wording used in the contract, wording that is normally only used when you are offering to buy a specific item or say real estate.
[edit]
It also looks like Musk agreed to any case being held in a specific court without realising what that court specialises in and what it can mean for him if he tries to walk away, as apparently the one he agreed to is known for being fast (in legal terms) so he can't hold things up for years (it's known for pushing through in weeks/months), and holding people/companies to the contracts and enforcing the sorts of terms and conditions that were in this specific contract.
It once again suggests either Musk's lawyers weren't necessarily great, or the overruled them thinking he knew better/could wiggle out of it if he wanted.
*The sort of lawyers you want doing a large complex tech company sale are extremely specialised and even then they'll often hire in outside assistance/experts which takes time and Musk didn't seem to want to wait. It's the same reason you have general criminal lawyers, motoring offence lawyers, violent crime lawyers and then lawyers who specialise in murder cases.
**Even the forum software here from memory has several different metrics that can be used for "activity" ranging from total unique visitors per day (including "guests"), to "registered" accounts that visit, to registered accounts that post, and then the timeframe in which they've visited (daily, week, month etc).