First they dropped orgs and teams they just didn't find useful any longer like large swaths of the HR team, marketing, etc. Then they asked leaders to identify the bottom ~30% of performers and culled them.
Now you're left with the "better half" of the company. But Musk isn't through yet - he needs to identify of that remaining 50% who the top performers are. So he created a variety of things to do to locate the people that get things done and those that have silently quit or are just resting on their reputations from previous accomplishments.
Now that you've identified the top talent you let everyone else know they can stay or go. This is the loyalty test to see who is culturally compatible and is invested in the mission. to many it comes off as crass and hurried and unplanned, but the entire point is to create an easy exit for people.
Musk has done all this rapidly and aggressively, but none of it is weird. He is unique in that he has access to resources others don't and answers to no one which can be good or bad. The end goal is he must believe that there's a solid core and a lot of rotten culture around it. Get rid of that and give that core the resources they need to succeed. Twitter will be hiring a lot of people in the coming months and this core of people will be doing the recruiting.
We'll see if this plan works!