There is a societal view nowadays that there can theoretically be both good and bad witches and sorcerers, as we find in Harry Potter or the Wizard of Oz. However this is far from the Torah’s perspective. Though the magic that magicians perform in today’s day and age are for the most part only slights of hand, in the past there was indeed such thing as real magic, where the “myths” of witches and sorcerers come from.
In fact, Rabbeinu Bachye defines what magic is, and brings an argument between the Rambam and Rabbeinu Chananel about how far its powers can effect existence. The Torah in this week’s Torah portion of Mishpatim states, “You shall not permit a sorceress to live” (Shemos 22:17). Rabbeinu Bachye defines “the concept of magic as connecting things that are supposed to be separated from each other and when connecting them together down here on earth, so to their powers in the celestial world mix and connect with each other and what results from amongst them are strange but incredible phenomenon! The prohibition of forbidden mixtures is an offshoot of this prohibition because it also mixes the celestial powers where they should be separated and distant from each other. Their connection does a lot of damage.
Behold the necromancers in Egypt their main knowledge was in magic and they did things which were absolutely wondrous according to natural means. Chaza”l taught, why are magicians called ‘kishufin’ in Hebrew because, they are ‘machishin pamalya,’ they disrupt the astrological spheres. The disruption of the astrological spheres is when a person on earth grafts two things which are opposites in simple powers that were decreed for the motions of the planets (and stars) and the decrees of gravity which is there their life force, this is what’s referred to as the astronomical spheres. A person who is placed in this world is supposed to act with in the customs of the world, and according to its basic nature. This is the will of his Blessed Creator that created it in this way. And if one is involved with magic that is a sort of disruption. This is also the view of the Ramban.
But the view of Rabbeinu Chananel z”l in his explanation in tractate Sanhedrin holds that magic does not disrupt the fabric of nature but rather it only appears to make a disruption. Magicians have no power in their actions rather it is only what Hashem decrees as Rebbe Chanina told a woman, ‘There is no one else beside Him.’… You might ask that since magic is useless unless where Hashem decrees it should work then why did the Torah prohibit it and why are magicians that practice it liable for the death penalty? The reason is because they transgressed the decree of Hashem by trying to do something He prevents them from doing. Just as if a person transgressed the decree of a human king and is liable for execution, all the more so for transgressing the decree of The Holy One Blessed Be He King Of All Kings. These are the words of Rabbeinu Chananel.
Now, because the Jews were habituated in this wisdom since they were coming from Egypt, it is something they were used to and easily drawn after, therefore the Torah had to prohibit them from being involved in this type of wisdom. To impress upon us the severity of the matter the pasuk does not say a sorceress shall surely die, but rather ‘shall not live,’ for the Torah wanted to stress the stringency of the matter with a prohibition of not allowing her to live just as it stressed a stringency by the seven Canaanite nations, ‘you shall not let live any soul’ (Devarim 20:16). It specifically mentions that a sorceress, or witch shall not live and not a sorcerer (even though this prohibition applies to men as well) because magic is found amongst women more often…” (Click here for Hebrew text.)
Chas vishalom, one should think according to the Ramban, a real magician could go around Hashem and do things beyond Hashem’s power and jurisdiction! Rather, the argument between Rabbeinu Chananel and the Ramban is to what extent Hashem allows magicians to control heavenly powers. The Ramban holds that they have the ability to disrupt and mix up the spiritual powers that bind and control nature on earth. Rabbeinu Chananel holds that Hashem would not give them the power to disrupt the celestial spheres in heaven but only to do things on earth, which looks like they are having an effect on heavenly powers. Either way, Rabbeinu Chananel’s question of why this deserves execution should still stand, because even if they are rebelling against the decrees of the King Of All Kings why is this any different than transgressing any of His other mitzvos? Indeed, Chaza”l say that even though every transgression deserves capital punishment, Hashem had mercy on many of the mitzvos and allowed for an offering to be brought, instead of death, if transgressed by accident. Many sins also only have the punishment of lashes, even if done on purpose; so why should this prohibition be more severe if it’s the same issue of going against Hashem’s decree? Especially since the prohibition of kilayim, forbidden mixtures, is only punishable with lashes. Why should magic be worse, if it has pretty much the same effect?
We must therefore say that there is a difference between magical practitioners and Farmers (or anyone else that mixes forbidden mixtures), or any other prohibitions that only deserve lashes. Those prohibitions are action of rebellion against Hashem and those actions should be eradicated, as we find that one should get rid of the kilayim, the forbidden mixture of plants that were mixed together, or take out the mixture of wool and linen in one’s garment, etc. Even if kilayim was formed with a neighbor’s plants, that’s considered a damage to the neighbor (see Ramban Dina Digarmi) and one is liable to pay for damages. Therefore, prohibitive actions of this type are punished with lashes, if there are witnesses and warning before doing them, in a Jewish court of law.
However, when it comes to magic, the whole essence of the person is a rebellion against Hashem’s rule and order. That is why it says a witch (or sorcerer) may not live, whereas it only discusses the actions of prohibitions by forbidden mixtures. Therefore, just as the results of the actions by forbidden mixtures must be eradicated, so too the essence of the issue itself by magic must not live; in this case the witch or sorcerer. They were executed if there were two witnesses and a warning. And if they still acted as magicians after the warning, then they were put to death by the Sanhedrin in the times of the Beis Hamikdash.
There is a major difference between actions that are against Hashem’s, to which Hashem has more mercy when handling such rebellion, versus when the whole essence of a person is undermining the way Hashem runs the world. Then He has to take action to get rid of that sort of rebellion.