The two companies merged, and a lot of discontent came about in that process, leading to Musk being kicked out.
Musk says it was because he was too insistent that the new company should be called X rather than PayPal, but everyone else says that it was because Musk was incompetent and that incompetence was hurting the company.
I don't claim to know who's closer to correct, but the ouster was brutal and each party had lots of vitriol to spew about the other.