One common trend among the more dawkins-jerking atheists who really like talking about how smart they think they are, but without having much to show for it is insisting that many religious people's beliefs are based on a really keen desire to not have to face death which "obviously" should be viewed as a conclusion to "your" existence. And so beliefs in an afterlife just express a hope for something they want to be true, but have little evidence for. Which admittedly is not that necessarily incorrect of a claim many times.
However, the problem here seems to be that these same atheists are insinuating that they personally don't do this. Which isn't true.
The main issue here seems to be that atheists intuitively assume/hope that they have some kind of substantive self that persists over time, but which ends at death. They seem fine accepting that death is the end, but not actually facing the real ramifications of lack of substance dualism. Or the fact that without design, their intuitive assumption that this is true is based on nothing.
Nothing in the physical world hints that there's a persisting self at all, much less one that is fundamentally the same being for the entirety of its existence. Biological appeals have to face the fact that not only does their matter get cycled out, but that they don't even inherently qualify different frames of consciousness as being one ontologically single being, nor is there any reason to assume they should. Psychological ones have to face that their process can be duplicated in ways that even the people claiming them admit would have trouble being defined as a singular entity. And likewise, there's little to even hint that thoughts are a fundamentally continuous linked stream, much less that if they were it was evidence that it was an ontologically single entity.
People can occasionally half admit this, but almost always scramble to find ways to not have to actually accept the ramifications. That most of these same people can't even vaguely cobble together a meaningful argument for long term persistence of a singular mind, and that they believe in some form of it because, like religious people, they're just hoping that something they have an easier time accepting is the case. And when they are faced with this, the knee jerk assumption is never one of acceptance, but always "but that must be wrong because I strongly feel like it should be, and for reasons I can't state" or at absolute best someone who pretends to accept it, but still obviously lives under the assumption that its wrong.
The question then is, what's the point of acting like its some gross level of misplaced optimism to want to persist in some cases its unlikely when one is just going to turn around and do the same thing in others. Especially noting that for various reasons, if a persisting self did exist, it would hint at possible ways it could beyond death as well.