Good question.
I think they are twined together, inexorably.
Say I am quite confident of what I am doing — and equally confident that I am doing it for a reason which — given time and clarity — turns out to be different, perhaps even opposite, of why I think I’m doing it. Which means ultimately — I’m NOT doing what I think I’m doing, but something else.
Ouf! I think one can get very tangled up in words here! Hope the feeling comes across —