I would agree that if the Captain gives you an order its only "legal" if its a "lawful order", my thought is that on an airplane is not the forum to argue the point. If it is or is not a lawful order I would think should be decided by a Judge somewhere, not by shouting on the plane. Dragging a passenger off a plane isn't something easily defended and I won't, but in all fairness, United didn't do that, the Chicago Aviation Department did, United asked, then demanded he deboard, and then called the closest thing to the proper authorities they could.(d) Each pilot in command of an aircraft is, during flight time, in command of the aircraft and crew and is responsible for the safety of the passengers, crewmembers, cargo, and airplane.
(e) Each pilot in command has full control and authority in the operation of the aircraft, without limitation, over other crewmembers and their duties during flight time, whether or not he holds valid certificates authorizing him to perform the duties of those crewmembers.
[Doc. No. 6258, 29 FR 19219, Dec. 31, 1964, as amended by Amdt. 121-253, 61 FR 2613, Jan. 26, 1996]
Whether United had the right to demand a boarded passenger leave is an argument for the lawyers, I don't think anyone can argue that had they denied him boarding the airplane that would have been wrong, but to preserve order and safety we have to agree that somewhere, someone has to be obeyed and given the presumption that they are the person in charge. If a defendant doesn't agree with a guilty verdict, he can appeal but he can't just refuse to obey the judge because it might later be overturned.
I guess I'm just sympathetic to United here because this is one of those things that I think is a lot more complicated than the headline. I also have thought from the beginning that the Dr. was something of a jerk and I can't say why I think that, I just do. He's in my perception a mini version of a Sov-Cit who thinks he's above the law. He got picked by whatever United's system of picking who gets booted and more than a few questions of if the rules were to the letter followed aside, in the moment I don't think he should have fought being picked.
Does the airline have the right bump you from a flight, yes. Does that right have to be exercised before they let you get on the plane, maybe. Is the way they pick who to bump fair? Maybe... A lot of decisions in this situation are definitely open to debate and all before they used excessive force, but I still maintain that when they told him to get off the plane, he should have gotten off the plane.