I think it's more the valence effect. The tendency for people to overestimate the likelihood of positive outcomes.
In some cases the result of this is simply delusion.
In other cases the effect can alter the outcome and so is not delusion. This is in cases were confidence is a major factor in the outcome, as in battle.
In the end I find that delusion and bias of the human mind can always be traced back to a primitive but now obsolete function. Makes sense when you consider that evolution operates on units of a million years and we only started writing a few thousand years ago. We were not designed, so to speak, for modern civilization.