Continuing an exploraration of a world where magic is potentially learnable by anyone" but not actually as common as it could be. I began by focusing on literacy, then followed up with a discussion of jealousy and envy. But there's another factor to consider: how do people feel about magic?
Because one thing we've been skirting in this discussion of magic is that there's a really good real-world analog: magic. Despite the fact that we now know that magic doesn't work, for most of human history, people believed it did. And for most of human history, magic has been treated as closely-guarded secrets or as dangerous and forbidden arts.
The D&D model for magic is based loosely on a mix of the European hermetic tradition and ars notoria from the medieval period through the 18th and 19th century "occult renaissance", as modified by fantasy literature of the 19th and 20th centuries. The roots of this were in rare classical Latin and Greek manuscripts; in the case of the ars notoria, these were manuscripts on mnemonic techniques misinterpreted as lists of spirits that could be conjured for various purposes. Thus, these texts were generally only readable by priests or those who briefly studied to be priests before dropping out and turning nomad. This is why we picture wizards as robed figures muttering things in Latin and reading dusty tomes; there actually were people wandering from town to town who wore robes and knew Latin. And these people were suspected of having magical knowledge, sometimes because they made their living as astrologers or alchemists. See, for example, the medieval poem "Dame Sirith", in which a woman is tricked into accepting the romantic advances of a young clerk (cleric) by an old woman who claims her dog is actually her polymorphed daughter, Or, in Chaucer's Miller's Tale, a seminary drop-out uses astrology to "predict" a second Flood to distract a man while he consorts with the man's wife.
So, what you have in the Middle Ages are some rare books, plus some assorted folk cures, and a few people in each town who might have a scrap or two of knowledge (the guy you go to for wart charming, or the old woman who knows how to make herbal cures,) and a very small number of people rumored to have lots of old, powerful knowledge... and a Church that becomes increasingly hostile to such practices, as well as a general public who feels uneasy about the whole thing. And why not?
Consider that example of Charm Person brought up in a previous post. There were certainly love spells that could be considered forms of Charm Person, such as the magical words "Bestaberto corrumpit viscera ejus mulieris", said while holding a woman's hand. But not many people would consider "Charm Person" a good thing, and those accused of using it were punished, so no, there was no huge rush to train everyone on how to use Charm Person.
On the other hand, the Pater Noster, combined with making the sign of the cross, was considered the equivalent of Protection from Evil, and it was widespread. Is still pretty widespread. Of course, it's usually considered prayer, not magic, but I bring it up to block any claims about "Charm Person" being less popular "because it didn't work"; there have been and still are people who believe love spells work, but more people use prayer and holy water, not because of pragmatism, but because asking an evil spirit named Bestaberto to entice a woman is frowned upon, while praying to God for protection is not.
The thing is, using magical power to fulfill personal desires is widely frowned upon, even today, and magical topics, although they have their fans, are not beloved by everyone. When Gilles de Rais, former general to Joan of Arc and richest man in France, ran out of money, and someone said "I know a way to find treasure by sacrificing small boys to a demon," he did it -- but there wasn't a huge surge of popularity in this method of finding treasure, once the method was revealed.