United Express flights take a backseat to UA mainline flights during irregular operations (ground stops) at slot restricted airports such as LGA.
What probably happend is that your UX flight lost its departure slot to a UA mainline flight that missed its slot and became ready for departure just as your UX flight was scheduled to leave.
This happens all the time at ORD and LGA during weather related issues. Keeping mainline UA flights on-time (or as close to that as possible) is the number one priority.