Witchcraft began with humanity itself. How? Because as all humans do we fear the unknown. When things are presented to us that contain such volume we cant begin to wrap our head around it we become afraid. Witches were seen as a median between the humans and the supernatural world of spirits and demons. Again we ask how? Magic, that's how! Magic in this time was extremely illogical and unexplained. How did the old hag from down the road heal a woman (not all magic was bad all the time)? How did your neighbor drop dead just days after calling this woman disrespectful names? It didn't make since but it seemed real enough to convince the churches that these alleged "witches" needed to be dealt with as fast as possible.
News spread, accusations flew, and in a mere blink of an eye thousands were on the chopping block, or the stake I should say. Some countries saw executions into the thousands and even more accusations. The profile of the accused was general correlated with the place they lived. Many women were accused due to the belief in love magic, as well as access to powerful bodily items such as blood, placenta, hair, dead infants, milk, umbilical chords, etc. Some accused the healers and the treasure hunters for their improper use of prayers as well as their desire to obtain non-Christian treasures. The astronomers and astrology buffs were accused as well for their non-Christian beliefs. This was known as "masculine magic". Seduction and other means of keeping or getting a husband was seen as a version of powerful "love magic" done by female witches.
This definitely looks like it could only come from the mind of a witch.
So to conclude, the origin of witchcraft didn't start because witches threatened the human race but rather because they lacked the normal ideas, beliefs, and actions of the majority of the population. Witches were merely misunderstood, misinterpreted, and many were wrongly accused as well leading to a hate for the unknown. Even the "witches" that used their magic to heal and help their community would soon be burned in front of that very community. The unknown is always threatening but it is not always bad, more-so that it is just misinterpreted.