So weather. Busy Terminal Control Areas, such as in the North East around New York, have entry and exit routes to control the traffic flow. During bad (convective) weather where airplanes often have to deviate around thunderstorms, the traffic flow is severely reduced as a function of the airspace limitations. The risk mitigation ATC approach is it is safer to have people waiting on the ground, rather than have planes in the air, running low on fuel, and then having to divert, hence the dreaded “ground stops” we often see.
Remember the ground stop may be triggered at the destination end as well as at the departure airport, so you sat on a plane not seeing any bad weather doesn’t mean there isn’t bad weather. It also explains why you may see other flights taking off. This FAA website is useful and often lets you know as much as the pilots about how long you may be hanging around;
https://nasstatus.faa.gov/
If you look at the “Active En Route Events” section, it will indicate when flow restrictions are in place, particularly for Florida airports during afternoon storms. ATC and weather is pretty complicated, and it’s not always about what you see out of the window, Glad you took the resigned approach to a terrible situation, always good to realize when you’re just along for the ride.