Musk is in trouble over Twitter because if i remember rightly, when he decided to purchase Twitter he was asked to carry out his own investigation into the company rather than accept as gospel what Twitter was telling him but he decided against it and accepted what Twitter had told him. Then a few day's later after he agreed to purchase Twitter a number of news articles cames out questioning Twitters claim that they only have approx. 5% of spam/bot accounts with critics/reporters saying that they believe the number to be in the region of 25%. Then a few weeks later we hear that Musk has put the deal on hold so he can investigate this 5% spam/bot claim, something he should have done before he agreed to the deal but he didn't because he accepted Twitters word on the matter. He then persistantly asked Twitter to provide him with the necessary proof of their 5% spam/bot claim, something Twitter have failed to do, hence why he is now pulling out of the deal.
Even if Twitter's 5% fake/spam/bot accounts is false they will claim that Musk accepted everything as is and that it is his fault for not carrying out his own investigation into the company before he agreed to purchase it and therefore he has a legal obligation to honour the original deal he agreed to.
Musk should have carried out his own investigation into Twitter to clarifiy all the numbers and figures that Twitter was giving him but as he didn't, Twitter's board are now appearing to say 'tough luck Elon, if you had any concerns you should have checked rather than accept our word, the fact you didn't is not our problem and thus the deal you agreed to still stands'.
Twitter are by no means 'clean' here because they are refusing to give Musk the information he requires and thus holding him to the deal he agreed to.