The thing to remember is that someone having a near death experience is, obviously, near death. The brain is in a panicked state. It hallucinates, or dreams, of happy or fantastical things to get away from reality and pain. Since the person knows on some level that death is nearby, thoughts are likely to turn to the afterlife and whatever concepts of it the person has been exposed to. Of course Heaven and Hell are going to figure heavily in these hallucinations. Contrary to what you suggest, I think people simply have Heaven and Hell in mind when they have their NDEs.