Although there's a school of thought nowadays that says that intention doesn't matter, like the old adage, "the road to hell is paved with good intentions".
I actually disagree, because I think intentions do matter. But they matter for just one reason, and one reason only, which is this: intentions are good for predicting the future.
If a surgeon intends to fix a person's heart, but knicks an artery and kills them, that is still a better person to have around than a would-be serial killer who can't seem to kill their victims. The surgeon's intention suggests that they will fix their mistakes, and probably save their next patient. Whereas when the aspiring serial killer fine tunes their skills, they will likely succeed in killing their next victim.