Some are forgetting that Twitter has (had) employees in other countries, not just America, and in those countries the terms of employment are much more strict than in the US. For example, if Musk tried to junk 100s of employees in the UK without notice he'd be taken straight to court.ONLY if that was written into a employment contract. Which i doubt very much it was written into most employment contracts. Companies always have a clause that if condidtions change...they can have employees come back to the office. This standard business practices.
The Ts&Cs in our employment contracts in the UK, for example, state when we are supposed to work (e.g. 9am-5:30pm), what breaks we have (e.g. an hour's lunch), and where our "usual" place of work is (i.e. the office), but they can be altered by agreement of both the employer and employee. I recently agreed to change my place of work to my home three days a week, with two in the office, rather than five in the office. It works for the employer and employee.
Musk's way of dealing with HR is to fire first, then think about what he's done, then ignore what he's done and move onto the next boneheaded thing he can do wrt to his employees.