It may be worth researching "Religion and the Decline of Magic: studies in popular beliefs in sixteenth and seventeenth century England (London: Weidenfeld and Nicolson, 1971; New York, Scribner 1971; Harmondsworth; London: Penguin, 1973; Harmondsworth: Penguin, 1978; London: Weidenfeld & Nicolson, 1997)" and Keith Thomas in general. Magic was a part of the universe and both the Church (the institution) (in the form of ringing bells to drive off storms) and the church (the congregation in innumerable forms ) used magic extensively.
Reviewing the other answers, I think they rely overly much on Exodus. This is weak historiography. The quote from Exodus is presented without context, and without any analysis to determine whether the quote aligns with the rest of the source material (a source that includes other quotes such as "thou shalt not kill"). I don't intend to engage in hermeneutics; my point is merely that it is not good history to base an entire analysis on a single quote.
As Thomas mentions, the institutional church was permeated by magical practice - the clearest of which is the ringing of church bells to avert storms.
The ringing of church bells is not documented in the Bible - it has no scriptural support, but it was ubiquitous and supported by the church. Most medicine was also not supported by scripture or science but was part of the Church.
William of Auvergne, a 13th-century French priest and bishop, certainly condemned most magic as superstition. However, he admitted that some works of “natural magic” should be viewed as a branch of science: as long as practitioners didn’t use this “natural magic” for evil, they weren’t doing anything criminal. Sealskin could quite happily be used as a charm to repel lightning; vulture body parts could be used as a protective amulet; and gardeners could get virgins to plant their olive trees without any anxiety – this was, after all, a scientific way of promoting their growth. HistoryExtra.com
or
Many unofficial rituals and beliefs existed alongside ones sanctioned by the Church. Educated clergy condemned some as magic, but it wasn’t always easy to do this because many magical and superstitious practices employed religious language, rituals or objects. Charms recited over the sick to cure illnesses often invoked God and the saints; spells for love and other purposes might use consecrated substances such as the Eucharist. The people reaching for them could even justify their actions by citing biblical precedent. Magic and Religion in Medieval England
or
The Lacnunga prescribed a set of Christian prayers to be said over the ingredients used to make the medicine, and such ingredients were to be mixed by straws with the names “Matthew, Mark, Luke, and John” inscribed on them. In order for the cure to work, several charms had to be sung in Latin over the medicine. Wikipedia:Medieval Magic There are multiple other examples in this article.
Cursory research would reveal dozens more similar practices. The church congregation practiced superstition and folk magic commonly and the church made no effort to stop them. (Again, cursory research would reveal dozens of examples)
What is the distinction between practices that are not supported by science or scripture but are expected to be effective practiced by the Church and practices that are not supported by science or scripture practices by the congregation, and practices that are not supported by science or scripture that are suppressed by the church?
Clearly the distinction is not about the practice - it is about whether the practitioner supports or weakens the Church. The Church supports and participates in the first two categories, but opposes the third. (this is directly responsive to OP's question - took me a moment to get here, but I had to cover some fundamentals). The church always suppressed those who engaged in practices detrimental to the community, whether those practices were simply criminal or magically criminal.
But at some point in the 15th century something shifted and the church demanded a monopoly on magical practice. That is the real question, and unfortunately I don't have an answer, although I think there is a very strong clue in the history of the Benandanti. Much of what we know today was invented by the Inquisition, but a quick review of the primary source literature reveals two things. First, the image of heroic female warriors riding bunny rabbits into battle wielding bulbs of fennel - an image that simply should not vanish from our collective memory. And second that there was clearly a folk ritual known and accepted among these cultures that involved magical practice to benefit the community that was not perceived to be evil until the Inquisition offered to stop torturing people in exchange for testimony that would benefit the Inquisition.
I think that is the first answer to OP's question; when persecution became an institution, the first law of institutional behavior took over - "Whatever is good for the institution is good; whatever does not strengthen the institution is suspicious" - note that I admit this is my opinion.
K. Thomas argues that in England the persecution arises from other purely political causes which it was convenient to mask under persecution of magic - kind of like dogwhistle politics, where one term is understood by members of the faction to represent another concept that it would be embarrassing to oppose. He makes a convining point that the rise in the persecution of witches was the result of Enclosure.
I'm afraid that it has been 20+ years since I've read Thomas or researched medieval attitudes towards witchcraft, and I haven't kept current, but I hope that will provide you an armature for research.