I don't have enough knowledge on the subject to answer with any credibility some of the questions so take what I am about to say with a grain of salt, or even better I bet there is literature(wiki?) that can explain some of it much better and more accurately.
The brain shutting down or the body releasing chemicals that might in some cases force hallucinations is preferable to the intense pain that is felt in some situations. Intense pain might actually harm the body and the brain. A lot of near death experiences have to do with the brain starving for oxygen, thus being unable to function normally and either shutting down or substituting the normal function with chemicals that kick you into states of hallucination of some sort.
For example, I know that there have been experiments that have tried to simulate near-death experience - doctors in general know what the state of the brain is(what parts are damaged or malfunctioning, etc.) when those experiences usually take place and they've tried to simulate this type of damage(without actually damaging the brain) and they achieve exactly what most of those near death experience survivors report - meeting with gods depending on your preconceived ideas(religion, etc.), out of body experience(your soul rising above your body, etc.) and so on... Some have even made experiments trying to put some huge sign on top of a platform that is above the level of the patient(something they've never seen), and see if when those who experience the out of body experience with their soul hovering above their body(and supposedly above the platform) could see the sign. None of the ones that reported out of body experience saw the sign - it was all happening as a hallucination in the brain.
About your last question, your first assumption is arguably much bigger than the conclusion you are trying to draw from it. And even then I would say that it's not necessarily true. You can have something that creates the universe and kicks in all the processes that lead to your existence, without that something having the power to have whatever effect on your life or death. For that you'd have to claim specific attributes for that something/being.