You can blame the Thieves' World novels for guilds. That's why they were a thing in the AD&D original books.

Now go read the books so you understand what a guild is and why they exist in that world.