Q: Why has evolution programmed us to believe we have immortal souls?
A: Because (in a sense) we do have immortal souls: our DNA. Every strand of DNA in every living cell of every organism is a genetic history lesson. We share our respiratory, circulatory, digestive, system as trillions of other animals, and we are related to all of them. Our billions of human ancestors lived, learned, died, and passed on their knowledge to us. Long before we had speech or writing, we inherited the instincts of our parents. Those that didn’t listen to those instincts tended to die off, so natural selection favored those that listened.
Those instincts, those primal feelings that everyone feels (even if their logical side seems to think otherwise), are just the shadows of our forgotten ancestors. Their “souls” live on as our instincts, nudging us in certain directions. What some people call “common sense” I like to call “common consciousness” because we all experience it and it doesn’t always make sense. Sometimes our instincts are useful, like defending ourselves from attack. Sometimes they are harmful, like letting religions or politicians exploit our fears. But for the most part they have proven to be highly successful in keeping us alive long enough to pass those instincts onto the next generation.
Though the idea of immortality is a bit exaggerated (because all things must come to an end), we *are* part of an unbroken chain that stretches back almost to the origin of the Earth, 4.6 billion years ago. And considering most humans don’t live beyond 80 years, 4.6 billion years is (practically speaking) eternity.