Yes, for disruptive behavior or safety issues. But they need to refuse to board you if they intend to bump you.
Things happen. They needed those seats so that the crew could service others at another airport. Can you imagine the headlines then if you show up and there is no crew to fly your airplane?
With union contracts, you can’t simply drive pilots to airports. Even if the airports are down the road. For example, if pilots are at DCA and need to get to IAD, they would have to fly to ATL and then to IAD as opposed to driving 35 minutes down the road.
Had they known sooner, they would have refused to board you at the gate. No agent wants to pull someone off of an aircraft but it happens and it happens often for a myriad of reasons.
That would make too much sense.