Of the multiple things the Catholic Church is ashamed of is the part it played in witch hunting, a practice they've since deemed outdated but I'm still going to explore why they did and why they're hopelessly ignorant on anything but just pretend to reconcile current times facts with the faith. The church has one idea on how the world works; based on the bible the source of ailments, i.e. diseases and disorders are caused by supernatural entities, which is a simple and naive way of looking at things.
Good things are brought by God, usually as a gift, bad things are brought by the devil and his minions usually as a punishment to good people, because he hates them but sometimes bad things happen to bad people because God is tipping the scales because tit-for-tat is a fair game.
Now this if you consider how they saw the world has demons and witches and their unsuccessful attempt at purging the world of them, does that mean evil walks amongst us? And why wouldn't that be the highest priority, why would they let it stand. Now as you know they no longer hang witches, dip them into boiling oil or burn them alive, but still what is the real case of what happens in the shadows, is the sect of witch hunters successful or as Hollywood shows it, has evil taken over the world? This is a rhetorical question because if you do entertain the idea someone could turn a stick into a snake I'd ask you to entertain the world of possibilities, a witch would be at par with doctor strange in even the likelihood of having power over matter and living beings. Think about it, there was that stage when pseudo-science would have alchemist believe you could turn any metal into gold, if you could inherently turn a stick into a snake without needing to sign a blood pact with the devil why wouldn't you be able to do the same for steel to gold, or charcoal to diamonds since that's more doable, scientifically speaking.
Without going into depth on dispelling the idea of why there's no such thing as a witch or a kid possessed by demons, there's no person who can fly on a broom except on a movie, if a witch can do it and Jesus supposedly trained the disciples on how to walk on water why aren't Christians who do miracles equivalent of real magic because if we can confirm either, a kid who can pull our chains rooted well with steel pins because of demonic super strength, forget the cool war I could imagine of super powered demon fighters vs. angelic soldiers with holy water batons, water balloons and all the other stuff because you know we haven't yet declared the enemy as un-savable. If we could have one of this confirmed it would be undeniable proof the supernatural exist and God would be a likely more believable tale through guilt by association, there's no such thing or one day like in game of thrones they decided to show Cercei that the stories are real; here's your proof, an actual white walker. The church would one day call a conference and present a kid who sizzles when you open the bible close to him, has a forked tongue and when he really gets pissed things starts swirling around him like a mini tornado.
They killed because they believed truly these were women who were proved to be witches and they were wrong, we can't hold them guilty for this because it's practically implausible to bring an institution to court for such crimes because the laws that would prosecute them came afterwards but they can't deny that if they did try that stunt today, we would have the pope prosecuted by the ICC and serve a hefty life sentence, if he's lucky. If he's not he wouldn't make it to court.