Intention matters!!..right?

I heard a couple people saying ( both irl and on reddit)that intention doesn't matter because the end result is the same . That's just not true, there's a difference between wanting to do it and accidentally doing it. What do you all think