When guilds were originally established in the Middle Ages, their primary purpose was to build and protect the economic value of skills and knowledge. Craftsmen allied themselves to essentially create firewalls around their primary competitive offering in the market. These inward-looking groups were able to impose discipline on their practice: enforcing standards, mentoring and training new entrants, and refining and building on old expertise to create new more valuable knowledge.