People seem to think that flight crew somehow have been ordained with god-given authority to suspend the rule of law aboard an aircraft. That is simply not true. People are legally required to obey safety-related crew instructions and placards.
The idea that if the flight crew instructs you to strip naked you are somehow required to obey and if you do not they have a right to eject you from the airplane is frankly ridiculous.
But it doesn't even matter, because the airplane was not in flight, 14 CFR Part 121 does not apply, and the people acting in question were gate personnel, not flight crew.