This is a very stupid thing to do. First, code is not the issue. Code can be rewritten in not a lot of time, when you have clear what to write. Twitter is not something so complex, in principle, thus it shouldn't be that difficult (a team of 10 good programmers in a month can probably rewrite everything). The thing where is 99% of the complexity and you can't redesign in a month is the infrastructure, how data is sto…
Its not stupid because he knows and trusts his engineers at Tesla. He knows nobody at Twitter. Hes probably trying to get an understanding of whats going on without relying on a bunch of employees who might not like him. It takes a while to build an employee base you trust, certainly in his situation.
If he needed an outside consult to confirm or refute suspected problems, that's ok, but that's not what happened here. He started off this relationship adversarially, and first impressions matter. This one is going to take some effort to repair. And if it isn't actively repaired, it's going to be a bumpy ride before he starts seeing good progress on his vision.