Throwing someone out in the street with a proper reason is not entirely legal in most jurisdictions, at least not in mine. Proper reasons include disruption, property damage, violating the rules, committing crimes, being intoxicated, not having paid, being past the leave date, etc.
In this case, the reason is "hotel staff from another hotel need to stay in your room", which is not grounds for expelling anyone.
Even when hotels make mistakes and overbook they can't throw out guests that are already accepted and accommodated. Hotels even go the extra mile of directing the additional guests to other hotels and foot the bill.
The correct thing for the airline to do is call the police if necessary and resolve the dispute using the law.
Morally? Legally? In order to not get beaten up? For the first two, I disagree. For the last one, perhaps but it might be worth the bad publicity for them and the lawsuit money.
"It's bullshit if they hurt you while forcing you to leave, but it seems like you've contributed somewhat to the situation you find yourself in when you leave them no choice but to physically remove you."
I don't want to be rude but one could use the same argument to justify horrible acts such as violence during sexual assault.
The equivalent analogy would be: you paid for and were situated in your hotel room, when you receive notice from the hotel that they have overbooked their hotel and that hotel staff from another hotel need to stay in your room and you must evacuate your room immediately. When you refuse to do so, they have security slam your head into the bedframe, resulting in you breaking your teeth, and then leave you outside on the curb.