I worked construction long before becoming a pilot. First for a non-union company and then later for a union. Safety was much improved as were pay and benefits.
As far as airlines a union is required when everything is seniority based. "If you don't like it then leave" is unfair when leaving entitles a complete reset of everything you've accomplished... yet without a union you would have management doing just that.