https://www.transportation.gov/individuals/aviation-consumer...
That said, the rule seems to be that once you've boarded, they need specific reasons (behavior, safety, etc.) to remove you from the flight. In this instance, it sounds as if the airline fucked up.
Especially if you have wilfully ignored the terms of service and caused disruption to other passengers.
That is precisely what United did.
> if the gate agent accepts a passenger for boarding after collecting or scanning the passenger’s boarding pass, the carrier is prohibited from removing the passenger from the flight thereafter.
If United rented out their house to two tenants, they can't just drag one of them out by the ears? It's on them for being two-timing fraudsters.