I don’t think the belief in life after death necessarily indicates a wish to live longer than we currently do. I think it is a result of the fact that it appears to people to be incoherent to expect your consciousness to cease to be: if you expect that to happen, what experience will fulfill that expectation?
Obviously none. The only expectation that could theoretically be fulfilled by experience is expecting your consciousness to continue to exist. This doesn’t actually prove that your consciousness will in fact continue to exist, but it is probably the reason there is such a strong tendency to believe this.
This article here talks about how very young children tend to believe that a mouse will have consciousness after death, even though they certainly do not hear this from adults:
For example, in a study by Bering and Bjorklund (2004), children (as well as an adult comparison group) were presented with a puppet show in which an anthropomorphized mouse was killed and eaten by an alligator, and then asked about the biological and psychological functioning of the now-dead mouse. Kindergartners understood that various biological imperatives (e.g., the capacity to be sick, the need to eat, drink, and relieve oneself) no longer applied to the dead mouse. The majority of these children even said that the brain of the dead mouse no longer worked, which is especially telling given that children at this age also understand that the brain is “for thinking” (Bloom 2004; Gottfried & Jow 2003; Johnson & Wellman 1982; Slaughter & Lyons 2003). Yet when asked whether the dead mouse was hungry or thirsty, or whether it was thinking or had knowledge, most kindergartners said yes. In other words, young children were cognizant of the fact that the body stops working at death but they viewed the mind as still active. Furthermore, both the children and adults were particularly likely to attribute to the dead mouse the capacity for certain psychological states (i.e., emotions, desires, and epistemic states) over others (i.e., psychobiological and perceptual states), a significant trend that will be addressed in the following section. In general, however, kindergartners were more apt to make psychological attributions to the dead mouse than were older children, who were not different from adults in this regard. This is precisely the opposite pattern that one would expect to find if the origins of such beliefs could be traced exclusively to cultural indoctrination. In fact, religious or eschatological-type answers (e.g., Heaven, God, spirits, etc.) among the youngest children were extraordinarily rare. Thus, a general belief in the continuity of mental states in dead agents seems not something that children acquire as a product of their social– religious upbringing, because increasing exposure to cultural norms would increase rather than attenuate afterlife beliefs in young minds. Instead, a natural disposition toward afterlife beliefs is more likely the default cognitive stance and interacts with various learning channels (for an alternative interpretation, see Astuti, forthcoming a). Moreover, in a follow-up study that included Catholic schoolchildren, this incongruous pattern of biological and psychological attributions to the dead mouse appeared even after controlling for differences in religious education (Bering et al. 2005).
“If that was so, they’d get the same wobbly feeling on hearing the fire alarm, or even more so, because fire alarms correlate to fire less than does smoke coming from under a door. ”
I do get that feeling even more so, in exactly that situation. I therefore normally do not respond to fire alarms.