I think Elon is ignoring how creative software development is, and I guess it's because his other companies are mostly hardware and the software has to be written with extreme safety concerns. Aside from those cases, software requires a lot of creativity, which in turn benefits from flexible schedules and letting people manage their own energy. That said, while the company is undergoing major changes, having everyone in one place is more efficient, however I don't think it will scale very well once they figure out the foundation and need to expand feature teams quickly.
This is a sign of an insecure leader. Entire companies have launched and run remote and succeeded. Twitter has less need for on-site work than most companies.