Following up on the post from my good friend Snowman on Fire, I wanted to add a few notes. Like Snowman I have been a customer of United and Continental for decades, with over 2M miles. Long ago I came to a healthy point in my relationship with them - I understand when I take them I'm risking random crap like this happening, so except for extreme cases, I don't let it bother me. I only fly them when they've made it well worth my while through a much better fare, travel times, upgrades, etc. All airlines have their warts and good sides, but its not a fluke that this happened on a United flight instead of someone else.
Snowman is on the money with his points: United was within their legal rights, but the situation was self-inflicted (caused by their own operational ineptitude), and of course they handled it all wrong.
Companies can develop personalities, and United is somewhat schizophrenic. They can have good days, but they also have really bad days where they are downright mean spirited. I believe them when they say they didn't know what the security people would do to the gentleman, but I have no doubt that many of them were hoping that is exactly what would happen.
Much of the bad side of their personality comes from the pre-merger United organization. If you have a good flight crew on United and ask them which company they came from, 8 out of 10 times they'll be from Continental.
The fact that they kicked a passenger off for an employee is totally within their culture, which is "employees come first". United flight crews tend to cut in TSA lines without a "sorry" or "thank you" more often than the others, get their bags on board first before the overheads start to fill up (look for them next time you board), and heaven help you if you try to get some service while they are figuring out their schedule for next month.
I had something this bad happen on a United flight a good while back, before cell phones could capture and spread it. Tried to get United's attention for two weeks after, but no one cared (and I know I was not alone in calling people there up - the main conversation on the flight was "did we really just see that?").
Finally, I want to add one more point to Snowman's observation that this was self-inflicted, because United had created the situation. Not only did they create the operational situation, but if the passenger was a regular United customer, they were in no mood to do any favors for the airline.