From family in the industry, my understanding is it’s not union benefits/wages/etc per se, but more the work rules that haven’t changed with the times driving over staffing, inability to fire bad performers, and overtime issues.
There’s a lot of on-the-clock non-work built into the work rules. My relatives in the industry described the typical day as involving on-the-clock time built in for cleanup&changing into/out of work clothes, briefing on tasks for the day, safety briefing (AM and again after lunch for legal reasons), smoke/coffee breaks, etc. The longest stretch of uninterrupted construction is about a 2 hour sprint into the end of the day.
On the staffing front, the only lever a project manager has is to give the 2-3 hardworking guys out of 12 a boatload of overtime hours to get the actual work done. This is one reason that on most every job site around the city you see some pretty sick cars. Those 2-3 guys are getting 50% of the work done out of the 12, and getting paid Google engineering money for it.
NYT article years back talked about 2nd avenue subway covered examples of work rules. Tunnel boring machine in NY requires 3-4x the staffing of Paris, because thats the contract negotiated in the 70s when it was seen to be reducing jobs.. and no one has revisited it. This is no small figure as we have a handful of these digging tunnels the last few years, at the rate of 50ft/day... for months.
Similarly there is a mandatory on-site oiler who basically sits in the break room all day because the machines do not need constant oiling anymore the way they did when the rule was written half a century ago.
One example from my relative - on a large NYC project he worked, they couldn’t take deliveries from suppliers on Saturday because it required the job site to be opened. Per union rules this would have required some inane number of staff to be on-site getting overtime rather than just say the guy to open the gate & staff (if any) required to empty the truck.
A lot of this is because public sector unions are treated as a voting constituent rather than a vendor by the government, and no politician ever wants to cross them.