Freud famously attempted to reduce religious faith to wishful thinking. But, ironically, it's the secular humanist who indulges in wishful thinking. As Dennis Prager recently pointed out:
The notion that people are basically good is a modern, post-Enlightenment one that is neither Jewish nor rational. As regards Judaism, from the Torah through rabbinic Judaism, I am unaware of a single mainstream Jewish text that posits that people are basically good. The Torah cites God Himself as declaring that the “will of man’s heart is evil from his youth” (Genesis 8.21). As regards reason, the empirical evidence against the belief that people are basically good is simply overwhelming.
Well, then, if Judaism doesn’t teach it, and reason and human experience refute it, why do so many Jews believe that people are basically good?
People who do not believe in God almost have to believe in man. Life is just too dark if one cannot believe in either God or humanity. Most people who do not believe in God cannot face the bleakness that not having a belief in man would lead to. It is much easier for those who believe in God not to believe in humanity.