I suggest you Google "is airline overbooking legal?" Literally, the very first link returned is titled "here's why it's legal for airlines to kick you off your flight" http://www.nbcnews.com/business/travel/here-s-why-it-s-legal...
Not only is it specifically legal, the regulations actually state that airlines have to give passengers a pamphlet spelling out their legal rights if bumped, and how much a passenger must be compensated if they are bumped. If it were illegal, don't you think the pamphlet would say "hey, the airline can't do this to you?"
What kind of legal scrutiny are you looking for? And do you not think that, among the tens of thousands of passengers who are involuntarily bumped in a year, not one of them would have challenged this in court by now?
When I buy something, I should not need an hour to read a contract.
Airlines are able to get away with this cause they haven't been challenged in courts. But once challenged, it will be deemed illegal.