I watched a film about Poltergist and those are the ghost that can hurt people. In a worst way, they can follow you everywhere if they want to hurt you, Have you seen the movie Conjuring, there is a ghost that possess a mother and she wants to kill her kids. There are ghost that breaks glasses, windows or they will throw something at you to hurt you. I am not sure of the reason, but as the other people says, they are kind of envy because you are still living and they are now spirits wandering. They are stressed ghost that wants you to experience the kind of pain they are feeling. Some ghost will only scared you but those that hurts are those you invade their privacy and wants to shoo you away. We need to respect even those entities that we cannot see.