From what Harry explain in book 9, it is simply a natural consequences of believing that killing is right. Magic only works when one truly believes in something. So when a wizard kill someone with magic, the wizard beleves that the kill is right, that it should be done, that it is right and proper.
That's not
all there is too it. If that was the whole story, genuine accidents with magic, even lethal ones, would leave no taint. But they do have some effect. Intent is a big part of it, though.
For one thing, pretty much
anything usually gets easier the more you do it. Even purely mundane things. The 20th killing with a gun is usually easier than #1. The third time you cheat on your husband or wife is usually easier than the first. Even good things usually get easier as you do more of them.
Add in the amplifying feedback effect of magic...