Magic doesn't bow to moral sanction, that is why there is no true Light or Dark magic, instead it simply exists to be molded and governed by the intent of those who channel and wield it. Magic is governed by higher laws than our mortal morality.
For this reason, I don't believe magic assess the wicked words, or sinister spells you might use against another, nor that magic judges them wrong and thus punishes the caster.
Rather, certain workings, especially those that revolve around seriously harming, damning, or negatively manipulating the lives of others, simply require more complex spellwork. And that complexity is tempered by natural safeguards in order to retain balance, generally most serious workings require one of the following trials:
Consultation: the spell may require you to conveine with a diety in order to seek guidance or acquire their blessing/curse on an object. Like graveyard dirt.
Sacrifice: some spells require sacrifice, you must give of yourself, be it blood, an offering, or the act of harvesting required organtic elements, such as some spells which require the use of entrails or bones. These allow the caster time to reflect on if he or she is truelly willing to go through with it before moving to sate the balance: before moving to take a life in order to manipulate one.
Once beyons the safeguards/trials often imposed by the spell, ritual or working; should the caster still be resolute in their course of action to affect another's life, health, or will-it will then force the magic to manifest in the form of something deeper and more volitile in order to correct the disbalance, to take what you desire, having given of yourself. By marshalling more complex and powerful forces, you achieve your end, but the backlash is also harsher. Because the spellwork was more intense, the consequences and demands of the magic are more severe.
I believe, personally, that this magical backlash-an involentary instinctive act by the magic to restore balance to itself-and the potential consequences resulting from the working-are the forces that are known by many names, among them Karma.
Just my two cents :)