Evil spirits, in bible traditions are connected to Satan/Devil, with Satan the serpent who lives in the tree of knowledge of good and evil. This tree is symbolic of law. Law teaches us good from evil; knowledge of good and evil. This knowledge is not something we are born with, but rather it is taught and conditioned, based on the nature of your culture. Law is not natural to the human brain, or else it would not need to be taught. The result is a repression of natural instinct, from which Satan and Evil Spirits appear; live in that tree.
For example, alcohol in moderation is evil and taboo in many Muslim Countries. However, alcohol in moderation is not taboo in most Christian and Atheist Countries. This law is not universal, like instinct, but conditioned based on your culture. The dark side of the law; taboo, causes a repression since nobody wants to be considered evil. This repression of the evil side imposed by the knowledge go of the law, can cause impulse and projection; i.e., evil spirits can appear. There is no uniform evil spirits in all cultures, but rather each culture has its own, due to its unique blend of rules and laws.
When the brain writes to memory an emotional tag is added as it is written. Our memory has both sensory content and feelings. Law is a unique form of memory in that it has two conflicting emotional tags. It has the fear connected to the dark side and the love/rest connected to the good side. The conflicting feelings are not healthy since it make one indecisive. For example, sexual taboos of the past came into conflict with instinct making the people of the 1950's, indecisive and repressed. This led to the compulsive of the sexual revolution in the 1960's.
The brain settles this induced artificial tension by writing the two sides of law into two separate memory locations, so we can be conscious of one side instead of both at the same time. This gives us a sense of control and direction. Law becomes like a coin that one thing, with two sides, however, we can only see one side at time.
Typically the dark side of law is repressed since most people like to see themselves as good and righteous. Even the rebel who break the law justifies this as good. The dark side, which may involve hundreds of law, by being repressed, can develop an autonomy; Satan, which adds dark impulses to self righteousness; kill in the name of the religion.
If you can see and control this, since you know killing is wrong, the dark side can appear in other ways; projected spirits. Spirits become outside forces that can be help one reduce the repression due to law; action or awareness of action. This may not always be the best advice if from dark side spirits.
Consider the Democrats and how they treat the wife of Donald Trump. They feel self righteous being mean. These impulses come from the repressed dark side of law, whose autonomy make this appear as the foundation for proper righteous behavior. It might be better for them to see a evil spirit, so they can make a distinction of this dark side. This will appear to be separate and conscious, instead of unconscious.