Nassim Nicholas Taleb said this quote

It took us a while to discover that we do effectively think, but that we more readily narrate backward in order to give ourselves the illusion of understanding, and give a cover to our past actions.