Aside from general job protection stuff, the general answer would be that they can ensure that some of the productivity gains go to employees rather than employers. Let's say the company has been so much more efficient thanks to AI that they earn an extra 100 million in revenue with the same level of spending. So, the union goes into contract negotiations asking for a 50 million increase in salaries per annum, and employees get part of that windfall.