It's an ethical framework formed over hundreds of years (Aviation built its ethics on top of maritime experience), that if the captains throws you out (resulting in death), at worst there will be inquiry at next port that will decide if they should be charged. Of course these days we have a lot more ready-made actions and much more robust legal system, but that's the bedrock ethics of crew responsibilities - and the range of actions they can take in pursuit of fulfilling them.
If a change of weather results in weight and balance no longer be correct for safe flight, booting off passengers in order of "who loses first on oversold flight" is probably the least problematic way possible.