Apparently the thought is that they follow the path they did when mortal. That means standing and walking where they used to, even if that floor no longer exists or a wall has been built.Good question, however; one would need to be a ghost or interview a ghost to know the answer. I for one have never understood why they appear to walk on floors, stand on surfaces, or even seem to need a surface to stay upright. Why don’t they just sink through the floor or float all the time? Unfortunately, the anatomy, physics, and mannerisms of ghosts is not taught in schools.