From SciAm:

Almost everyone has a tendency to imagine the mind continuing to exist after the death of the body.

Even people who believe the mind ceases to exist at death show this type of psychological-continuity reasoning in studies.

Rather than being a by-product of religion or an emotional security blanket, such beliefs stem from the very nature of our consciousness.

Full article