Does anyone have a link to the relevant legislation that requires passengers to obey crew? As I'm in the UK, Google is mostly giving me UK-centric results. For example the relevant UK legislation states "Every person in an aircraft must obey all lawful commands which the pilot in command of that aircraft may give for the purpose of securing the safety of the aircraft and of persons or property carried in the aircraft, or the safety, efficiency or regularity of air navigation". Obviously UK legislation is irrelevant, but I would be very surprised if the equivalent US legislation required passengers to obey absolutely any command by crew. For example, passengers would not have to obey a command to undress and run down the aisle naked. There will be limits as to purpose of commands that must be obeyed, and I'm guessing that leaving the aircraft for the purpose in this scenario might not be one of them.
The passenger was wrong to refuse the request/order to deplane. That isn't in serious debate. That he was wrong doesn't in the least bit excuse UA's subsequent actions, from the physical act of removal to their continued tone deaf PR response.