In Buddhism it is commonly said that the intention behind an action is the important factor.
For instance, when we are raking the lawn, and our intent is to make the lawn more healthy in the long run, then the intention is good even if some innocent insects and grass plants are killed in the process.
On the other hand, when we intend to cause harm, for instance, if I were to stab someone with a broken bottle with the intent of killing them, then that is a bad intention.
But my question is "why does the intention matter?" Are the effects of an action somehow dependent on my intent?
For example, if I stabbed the person accidentally, all other factors the same, would the effects be different?

Would someone else be able to tell one way or another that the killing was or was not intentional by some subtle difference in the effects?
If so, then please explain further how this is so.
If not, then why would intention be relevant? Just how is kamma related to intention if they are independent?
It is said by some that "intention IS kamma."
Could someone please explain?
Thank you
RB