I've long pondered this. Starting with the premise that all human traits serve some evolutionary
advantage, self deception must be useful. Let's consider humans facing some problem with
multiple solutions, eg, explore outside of familiar ground, or stay where it's safe & reliable.
Which ever path is chosen, supreme confidence in one's choice serves survival.
Old Henry Ford quote....
"Whether you think you can or think you can't, you're right."
Of course, doubt, fear & continual questioning also serve us. This explains why we have a
mixture of predilections. The environment sorts out winners & losers, but still genetically
preserves this diversity of approaches. Society is doomed to have a mix of believers &
non-believers, eh. Tis best to just get along with each other.