First, if we were happy, enjoyed life and led a normal balanced emotional life than at the time of death, we would see a tunnel of light/darkness which would lead us to our next realm of existence. However, if we were filled with angry emotions, bitter resentments or if we held negative feelings or emotions against other people within us, we may be trapped here, anchored by our negative energies. Departed spirits must remain here until they can resolve or complete their mission.
Second, if we had unresolved issues or unfinished business we would want to stay until those issues or business concerns were taken care of my us. If a loved one died and wanted to be sure that their spouse or children were handling the passing of their loved one. Suppose that a couple had been married for fifty years and one spouse dies. Do you think that the dead spouse is going to depart and leave their loved one behind. I don't think so. I think that he or she would remain behind watching over their loved one until it was time for that spouse to pass on. Where would this departed spouse stay? Would it be near the loved one? Would it associate with other departed souls waiting for their loved ones to pass on?
Third, what if a child dies and is afraid to enter the light? The child-spirit is afraid, wants its mother and so it searches for its mother by walking away from the light. Haven't you noticed that some pranks are child like and resembles pranks played by children.