This is based on my understanding of how the afterlife works in D&D, which is as follows - when a mortal being dies, their soul is transferred to one of the Outer Planes, specifically the one most matching their alignment. Following this, they are stuck on that plane for eternity. Not much can interrupt the passage of a soul to the appropriate plane - pretty much the only things are Soul Binding or undeath.

It is often said that being evil in such a world is a terrible idea, because you are almost guaranteed to go somewhere nasty on death. Even undeath or other magics only delay the inevitable.

But, do most mortals know this? Certainly, its possible to travel to the Outer Planes, but Plane Shift is a high level spell and likely outside the reach of most people, and just because you've visited a place, doesn't mean you know everything about it. Commune and similar spells can give cryptic answers, which likely religious scholars will argue over for... ever, really. Also, distribution of information is nowhere near as efficient as our world - you can't exactly check wikipedia. Evil outsiders are very likely to lie about how the afterlife works, and this will confuse the issue further. As a result, many religions will have the wrong idea about the afterlife.