People may think the concept of demons is a medieval fiction. but whether you agree with it or not it explains a lot. Let me explain: When we do some good deed it makes sense to say that this evokes some kind of special attention from God. But when we sin, we usually think of God as averting his attention from us. So then how do we ascribe punishment to Him as if he is punishing us directly? It is more natural to say that God has placed in the world a natural order of objective morality. We we rebel against it we are being punished by the natural process of what happens when a person disobeys the moral law. This explains we we are sometimes  afflicted with evils that seem to be out of our control. And we think there are angels that are the natural agents of protection.