Consider one example mentioned by Charles in his comment: Charm Person. The base concept behind that spell is that it turns one person into your best friend for as long as you would normally keep a friend; some extend that to a form of mind control, but even the "weaker" interpretation is pretty powerful.
What spellcaster who has acquired Charm Person is going to give it away to everyone who can read?
The natural tendency of most people would be to hoard powerful magic, especially magic that could be used against them. Getting a spell from someone would be a matter of trust. Even if a spell can't be used against the one who taught it, greed could become a factor. Take the Protection from Evil spell; pretty innocent, right? But which is going to make a spellcaster more money: selling notes on the spell so that other people can use it, or selling spellcasting services?
Again, look at history. In this case, the history of invention. We have several historical examples of people inventing something, then keeping details of the invention a secret so that they could make money from it. James Watt's steam engine was a trade secret until someone figured out how he'd perfected the steam engine and sold the details. In the U.S., the concept of patents and copyrights was modified specifically to encourage dissemination of information instead of hoarding secrets. Despite this, we still have fights between corporations and people reverse-engineering their designs.
There's also "accidental hoarding". In some D&D settings, there's an assumption that magic was invented long ago, and magic-users are working to recover lost knowledge. Magical manuscripts are copied by hand, which means two things: you need to pay for the copying (which is expensive, under D&D rules,) and the original is unavailable to the owner while the copying is being done, not to mention the original is at risk while it is in someone else's possession. Magic-Users may hoard their spells not because they want to keep the spells to themselves, but because they don't want some low-level doofus to spill ink over their one-of-a-kind manuscript. They may sell their notes on a spell, but they'll do the copying themselves, thank you. When they have a week or so to spare.
My house rules for Read Magic and learning new spells are much more generous than the default. If you have Read Magic, you can learn spells for free and add them to your spellbook yourself. If magic-users want income from selling spells, they will be particularly picky about who they share the Read Magic spell with. That means that learning a 1st level spell will require spell research (2,000 gp) under my system. Not exactly cheap, and probably the result of spell hoarding.
Part III of this series will cover another factor that could restrict the availability of spells.