Mishandled by UA which should have better prepared to get its crew where it needed to go before boarding occurred, and should have offered more compensation.
That said, I would never argue with law enforcement. It rarely ends well, whether you are in the right or not. And, parenthetically, I have seen enough things go wrong (admittedly usually maintenance or weather delays) that I try to always have alternative options to get where I am going if I need to be there. Someone who flies only rarely may think that buying a ticket means you will get there at the promised time, but someone who flies frequently should know that is not always the case. It is also another reason I will try to buy domestic first or upgrade with a certificate or miles if it is a crucial flight due to a meeting. Those are the last people to get IDB'd and the first to get taken care of in the event of IRROPs.
So not the guy's fault, but it is possible to avoid getting in that situation.