The workers' unions we have today are the 21st century version of guilds. Guilds can be traced back a long way, but in Victorian times, for example, every worker who had a specific skill would belong to a guild (union) in order to protect their clientele, their work space, and their rights.
One modern organization that can be an example of a modern "guild" is the Federal Education Association (FEA). What happens is that if a teacher is asked by an administrator to perform duties outside their scheduled paid hours, the teacher has the right to contact their union representative to question the purpose of the task. If the organization itself does not require the services of the employee, and it is proven that it was the administrator's own whim who asked for it, then the administrator could be held liable for unfair practices, and could be fired.
In essence, a guild and union are like a "neighborhood watch" to ensure that the administrative privileges of an employer are carried out under the premises of the contract which the employee signed.