* Vocational training: unions in our area run schools to train craftsman (e.g. carpenters). This increases productivity and screens for quality.
* Shifting workforce: Construction companies expand/contract as they get big jobs. The union is a clearinghouse that enables tradespeople to switch between companies as they expand/contract. The union also helps by running benefit programs that travel with the workers.
* Commodity-ish labor: Most carpenters have about the same productivity, so it makes sense to negotiate their compensation in bulk. Unions don't work as well when productivity/value varies greatly between workers.
I also worked as an apprentice carpenter for several summers during college. I wouldn't say that the carpenters I worked with had a glowing view of the union. They seemed suspicious that the union reps were corrupt, and talked about how they would "shut down the job" over minor union infractions. They also believed the "hall" was corrupt/political in how it matched carpenters who were out of work to jobs. Several were also contemptuous of what they saw as the union discouraging hard work (if you were working hard, you were "ruining the job.")
The main point I am trying to make is that unions are complex from both the employer and employee side.