If we look at afterlife beliefs-and their secular substitutes such as life extension, cryonics, mind uploading, simulationism, quantum immortality-I don’t think they all have the same motivation-two people may adopt the same belief with different psychological motivations.
For some people, the idea that their present conscious moment might eventually be left permanently without any future extension is terrifying-but provided that doesn’t happen, they might be neutral (or even positive) about the prospect of the contents of that consciousness eventually becoming so radically transformed that it becomes a completely different person, or even something which transcends human notions of personhood, albeit ultimately still continuous with the person they are now. For other people, that prospect is terrifying. It really depends on what one is most attached to - the mere continuation of one’s own consciousness, or its distinctive contents that makes you you.
For some people, the idea that their present conscious moment might eventually be left permanently without any future extension is terrifying-but provided that doesn’t happen, they might be neutral (or even positive) about the prospect of the contents of that consciousness eventually becoming so radically transformed that it becomes a completely different person, or even something which transcends human notions of personhood, albeit ultimately still continuous with the person they are now. For other people, that prospect is terrifying. It really depends on what one is most attached to - the mere continuation of one’s own consciousness, or its distinctive contents that makes you you.