There seem to be a few people who like to imagine what motivates Elon to make these drastic cuts to jobs at Tesla. Many ideas about this have been batted around, some of which may or may not be 'the' reason. Most get close, but miss the mark when anyone thinks there is an emotional side to this on Elon's part. There isn't.
To me, the "reason" is Elon knows that "you get what you inspect, not what you expect." Read that again and think about how this might apply.
In a general sense, people who do outstanding work, do so because they are in an environment where it is all on them to perform to help the project survive. As they achieve goals and the company grows, more people are hired. The folks who were the shakers and movers often get promoted and find themselves managing others now expected to do the same. Others, who these managers expect will be driven the way they had been to innovate. To feel that pressure that drives them to achieve.
Eventually, such an arrangement becomes based on trust more than inspection to determine if things are going as well as they can be. This doesn't mean folks aren't working hard, but it might mean they aren't working smart.
Elon has what is a unique ability to inspect a process with an unwavering perspective based on maximizing performance. A perspective which is unbiased by other measures like time in the job, personal friendship, or, trust that everything is fine. He can see when that certain something is missing, whether to burn-out, comfort, relationships, or the myriad other factors that can play into such degradation in performance over time.
When on inspection he determines this dynamic his most productive people have displayed has now changed over their time in the job, he knows the only way to make it right is to bring in new blood. People who are hungry and in the right place in their lives to take on an insurmountable challenge and run with it.
It seems just as likely that anyone who has worked around Elon will understand this, and won't take it too hard when their time in the sun has passed. It was an incredible experience where they were able to accomplish amazing things, and were rewarded for it in many ways. They take this with them to their next project, and with any luck will rekindle that fire and do amazing things again, with a change of venue and of perspective.
You will always get what you inspect more often than you will get what you expect.