The key idea here is that managers of a company have a fiduciary duty to act in the best interest of the company, and not to work on their own side projects. He certainly could make employee do what he wants, but it's not legal and is why people are unhappy.
You have gone to the mat, arguing with industry professionals, while evidently having little or no industry experience, and making obviously incorrect statements like “the CEO can make employees do anything.” Like, come off it man, you don’t know what you’re talking about. You just want to be oppositional. It’s not working, you aren’t winning the argument.
This is not how it works.
That's exactly how it works. There's nothing illegal about employees of one company helping out another. If Tesla shareholders don't like it - well, they can vote out Elon at their next meeting. I'm sure that will work out great for them.
Larry take your team of coders, we are going to construction site of my house, I need some free help there and don't want to pay for workers. Sounds odd hmm? Really this is not how it works.
You are assuming free.
Corporations have a fiduciary duty to all shareholders, including minority shareholders - not just the majority. The issue isn't it being "illegal" for "employees of one company helping out another". It's that Elon Musk is an employee (CEO), not the full owner (only a partial owner), of Tesla, and doesn't have the legal right to treat Tesla resources as his personal property.