I think it is wrong to think of the Guilds as Unions as we now understand them.
Today the word Union is totally associated with socialism and although the guilds may have possibly have been socialist in political leaning, their primary objective was to organise the training and apprentices for their particular trade.
They officiated over the completion of the apprentices' training and often were responsible for the welfare of retired craftsmen.

I know that 'Union and 'Socialism' are dirty words in many societies but one must remember that in 19th century Europe, those with money and position often held power of life or starvation over their workers, however well qualified, and that many of the guns that we worship were produced under the most awful working conditions, especially in the regions that produced guns at the cheaper end of the spectrum.
You can hardly blame those craftsmen from trying to wrest a little power from their masters. Hence the introduction of the unions as we have come to know them.