As to why people experience the 'tunnel' fantasy - that's due to the visual cortex where the information from the retina is processed.
Hallucinogenic drugs and a lack of oxygen to the brain (as often happens near death) can interfere with the normal rate of firing by nerve cells in this area. When this happens, “stripes” of neuronal activity move across the visual cortex which is interpreted by the bran as concentric rings or spirals.
These are more often than not, perceived as a tunnel.
I have some sort of experience of this phenomena myself. Many years ago, while playing football, I broke my ankle in a bad tackle. It was extremely painful. I remember closing my eyes and seeing explosions of light which spiralled inwards. Obviously, I didn't actually 'see' this vision in any meaningful sense – I simply 'experienced it' as my eyes were closed. However, the sensation was of a tunnel, spiralling inwards.
I wasn't dying, but my mind clearly concocted this visual deceit as a coping mechanism.