Becoming possessed by a demon isn’t so much like the devil entering you, as it is you forgetting about God, thus creating an unguarded space or void allowing the devil to take control.
When we forget about God, we forget about death. When we forget about death we begin to live as if we are immortal. And with that mentality we forget all about God’s judgment. Hence, when we forget about our Lord’s Commandments and living and following His teachings, we become like gods unto ourselves doing whatever we want and moving further and further away from God. Therefore, to put it quite simply, when we forget about the physical death, we die a spiritual one.