When you do it, it feels like it's on purpose.
That's because action is preceded by desire and intention-formation.
If, one day, one week, and one month later, you were glad you did it, it really was on purpose.
If, one day, one week, and one month later, you regret it, and that was a predictable outcome, you were powerless, blinded, insane, and driven by an urge beyond reason.