Unions generally lean left politically for the same reason business organisations tend to lean right. It would be strange for them to advocate for worse policies for their members.
The unions doesn’t always try to get the most out of the companies in the short term but rather plays the long game and helps out in ensuring the company are healthy as well.
In times of economic trouble they can eg collectively negotiate solutions that minimize the amount of job cuts by temporarily worsen the policies for the employees.
The collective bargains applies to both members and non-members at the work place though.