As this Times article (below, paywall) points out, Musk tweeted, immediately before launching his takeover bid, “We’ll defeat the spam bots or die trying!”. Musk is what you would call an activist investor, if he actually went through with investing, in that he claimed that he was taking over Twitter in order to fix its problems. Fixing the number of bots on Twitter was one of the main reasons he announced he was launching his takeover bid. Now he is claiming that he has to withdraw his offer...because of the bots on the platform. The article also claims in the opening paragraph that Musk waived his right to due diligence as part of the offer, so he can't credibly withdraw on the basis that his performance of due diligence indicates to him that it is a bad deal. It is rather like agreeing to buy a house sight-unseen at an auction, and then turning up to see the property and announcing "I'm not having that".
Erratic Elon Musk leaves Twitter with three unbearable choices | Business | The Sunday Times
It is more likely that Musk is getting cold feet in light of the changing economic situation since he launched his takeover bid, and the effect the takeover process is having on Tesla's share price. Twitter is certainly the enemy of western civilization, as many of us here recognize, but the enemy of my enemy is not necessarily my friend. The most righteous action anyone could take who owned Twitter would be to delete it, but Musk has long been an enthusiast of Twitter, and wanted to keep it going, and he has helped to make it as big as it is.