Great question, @xenomorthian. A few weeks ago someone here on Tumblr suggested that this was the fault of the Roman Catholic church for teaching people that they were sinful, an answer so beautifully, wildly, exquisitely wrong that I could make no answer at all for fear or impairing such a rare and comprehensive ignorance. Let me fix that now.
The answer, so far as I see it, is that like many historical periods, the medieval period ended in a backlash. Sadly for them, this backlash has lasted an unusally long time. In broad strokes:
- in THE RENAISSANCE (1400s-1500s), humanists rediscovered the value of going back to original source documents to get at the truth of what had been said in them. This gave scholars a much more accurate view of what historians, scholars, and holy books like the Bible had actually taught, free of later, less accurate accretions. Unfortunately, the lesson the Renaissance humanists took from this was "new books bad". Anything that had been written in the medieval period - for instance, scientific treatises that pointed out the obvious errors in Aristotelian thought - was now viewed as worthless. Thousands of medieval books were lost, destroyed, or torn apart for spare parts because Renaissance humanism considered them valueless. It was here that thinkers dubbed them "the middle ages" - they were what came between the real history of the ancient world and the "rebirth" of the Renaissance.
- in THE REFORMATION (1500s-1600s), humanist primary-source scholarship revolutionised how people viewed and studied the Bible, leading to the Protestant Reformation, originally a movement designed to prioritise the old sources above later medieval traditions such as indulgences, transubstantiation, and ultimately, the entire Roman church hierarchy. While (as a Reformed Protestant myself) I view the Reformation as a net positive and a movement that itself was deeply medieval in origin, this did ultimately lead - despite a lot of early Reformers' best intentions - to a sharp break with, and critique of, the medieval church.
- in THE ENLIGHTENMENT (1600s-1700s) many Enlightenment thinkers viewed religion as antithetical to reason. Writers such as Edward Gibbon valorised the pagan, pre-Christian world of Ancient Rome and viewed the medieval period as a time when superstition ruled over reason. (Somewhere, the medieval period's most influential figure, Thomas Aquinas, is facepalming). This is where the "filthy, stupid, superstitious" view of the middle ages really got started, and the existing term "The Dark Ages" was hard-welded to the medieval period.
This view has remained influential ever since, as you can tell from the fact that we still use the Enlightenment's own self-aggrandising term for itself, and are having trouble letting go of its views on the middle ages. So influential has the view of the medieval period as uniquely dark and barbaric become, that it's now commonplace for ANYTHING stupid or brutal to be attributed to them. Medieval people knew the world to be round, enjoyed regular baths in purpose-built bathhouses, had a policy against making accusations of witchcraft, and understood the value of using antiseptics in wound care. But the opposite views are regularly attributed to them (mostly from the 1500s and 1600s, when witch hunts came into style and bathing went out of style). Why? Because we all know that the Renaissance and Enlightenment were times of rebirth and wisdom, so any dumb things that happened in history couldn't possibly have happened then; they must have happened in medieval times.
The 21st century has seen a nasty new development in this intellectual wrangle over the middle ages described by Amy S Kaufamn in THE DEVIL'S HISTORIANS. Certain far-right groups have chosen to embrace the idea of the brutal middle ages to justify their own religiously motivated brutality. I've seen these people argue that Richard I, leader of the Third Crusade, would have been against interracial marriage (in fact, he famously proposed that his sister Joanna should marry a brother of Saladin in order to settle the war). I've seen them argue that medieval religion made no critique of the knightly warrior ethic (in fact, the Peace and Truce of God movements, some of the most successful popular movements in history, were designed by the church to rein in the violence of the knightly class). I could go on.
TL;DR: the medieval period, much though I would not have liked to have live in it, was NOT a sink of darkness and brutality, and it's vital that we recover the truth about it, because bad actors WILL do their best to use the propaganda.