The Catholic Church of the medieval period pretty much controlled every aspect of the lives of their parishioners. Everyone from king to peasant had to go through the Church literally for life’s events from cradle to grave and everything in between. From baptism to confirmation to confession to marriage to last rights and burial on Church grounds–if you didn’t go through the Church for these things they weren’t considered legitimate.
But it happened quite often that when the church couldn’t provide a certain service, the people would be left to seek alternative ways of doing what they wished to do. Let’s say you wanted a certain boy or girl to fall in love with you. The Church wouldn’t have any remedy for that situation. Or take the case of healing the sick. Now, it was absolutely the practice in some areas of Christendom that the Church would set up hospitals and provide medical care for sick people, especially during times of plagues and other pandemics. But if you wanted the healing of, say, a headache, the best the Church could do for you is pray. And prayer can only do so much, mostly as a placebo.
And that’s where a certain class of people arose in the middle ages to meet the needs of people who found that the Catholic Church didn’t actually have the ability to solve or handle all the problems of their parishioners. And we’ve discussed this before, and recently, that when someone or some group tries to take the place of an already established entity or power (or even if there is the perception of such), then those in power will strike out against the usurper. And that’s what happened here.
You see, there was no such thing as a doctor as we today would recognize, at least in Western and Central Europe. Oh, a handful of medical schools opened across the continent, but they were often run by the Church, and they were most often in large cities that were springing up especially after the Crusades. But these medical schools did nothing for the people who lived in smaller towns and villages and certainly they were not helpful to those in the countryside across Europe.
And so people began turning to the people who would at least try to help them with their headaches and skin rashes and venereal diseases and whooping coughs and other physical maladies. Oh, and, sometimes, people sought help for other things, things like their love lives and their melancholy or their nightmares. And, sure enough, when these people who offered help grew too popular or too successful or too prominent, the local priest or the local Church organization would rise up to put them down and restore the normal progression of things such as relying on the Church for the solutions to all of life’s problems. In doing so, they literally demonized those people who were only trying to help others. And people kept going back to the healers.
Now, you and I would call a person like that a doctor and reward them.
The Catholic Church called them witches and burned them.

