I think some studies in neuropsychology have shown that most 'normal' people who don't experience depression, anxiety or other psychological problems, and who are able to have normal fulfilling (subjectively) meaningful lives do in fact live in a kind of illusory and nonrational bubble of optimism which their brain's neurochemical and hormonal makeup creates for them.
One level of explanation for this is that our remote ancestors lived in very harsh and uncompromising environments with high infant mortality, frequent periods of starvation, most deaths occurring in middle age, rudimentary shelters, many diseases etc. On average, the most (irrationally) optimistic, hopeful and positive thinking individuals would have had a higher probability of surviving and passing on their genes. The phylogenetic result from a psychological point of view is the average type of person you see today, generally happy, optimistic, able to create purpose and meaning for their individual existence, even in the face of adversity and occasional suffering.
This optimism, seeing positives and minimizing negatives, having a robust sense of self, some amount of narcissism and feelings of self-worth and pride, are neurochemical and synaptic constructs and processes modulated by neurotransmitters like serotonin, dopamine, oxytocin, endorphins and other hormones produced by the body, the levels of which are partly genetically predetermined (and partly the result of environment, which creates specific psychological phenotypes).