Imagine a powerful wizard's guild. They have the arcane magical monopoly in a large kingdom, or maybe even several kingdoms. All mages are "sanctioned" by the Guild, or are renegades hunted down.
This guild is very influential, but does not rule. Its members are forbidden from holding a title of nobility. So they often accept bastard children, 3rd sons etc. So they are tied to the nobility, and the nobility gives them a lot of money. Of course, the Guild scours the countryside for kids showing magical gifts so they can been enrolled in the guild academy too!
So you have a scion of nobility learning to become a wizard in the guild. What happens if this student doesn't have an inborn gift for magic (isn't a sorcerer) nor is a good student (not wizard material?). Well if it's a petty noble, oh well, it doesn't always work, your offspring is now a kind of scholar I guess?. But what if it's a noble family you cannot let down? Too powerful, too generous...
Well, you warn the student that they are going to get expelled soon, then you let them find out about the "secret book of power" in the "hidden library". The student goes to look for it, aaaand blam, pact is formed. The student is now a "wizard" (or maybe a sorcerer?) and is certainly anxious to maintain the illusion of that. This makes perfect sense. Wizard use arcane solutions to difficult problems. What do you do when you have someone you must turn into a "mage" and they aren't talented at wizardry and have no innate power? Well, "warlock-ize" them! Problem solved!
So I was wondering... what kind of warlocks would a wizard guild/academy create? Clearly it has to be something the Academy feels it can control - a patron that is not a threat to the academy and is instead pleased by the constant stream of disciples.... Genie seems like a winner, but perhaps fiend, or even hexblade?