We all have seen clear examples of how we assume others are like us and got it wrong. That would prove that our relationships were more about the picture we had of them than them. We all have a degree of narcissism where we only like in others what we like in ourselves. And vice versa. We outsource things we hate about ourselves to others to distract ourselves from how bad we are. Sometimes we subconsciously admire the malice or dishonestly or weakness is ourselves, and project it unto others. We enjoy condemning them while harbouring secret regard for them.
It is possible that is what we want to believe in Satan and demons for. That is not the only reason why we might want to.
Psychological studies have found that highly religious people can feel their lives have little or no meaning or value or importance. It was found that these believers tended to think that evil divine/supernatural agents were influencing the actions of murderers. It stands to reason that if it is hard to feel your life has meaning, you make it harder by imagining such malignant entities. An atheist would be better off. Incidentallyt was found that people who needed a sense of meaning in their lives were prone to blaming say demons on what each of the murderers did than on his or her suffering great abuse in the past which ruined him or her as a person. That would be too judgemental.
Is it like this? You think you are nothing and that to make yourself feel special, you have to tell yourself demons are finding you too wonderful to bother with. So they get Joan next door to shoplift and John to murder. It could be. You think this nonsense helps you but it does not. Many religious neurotics create contagions so it is very worrying indeed.
Bizarrely, many believers get a sense of meaning in their suffering not only from the sweet side of religion but the nasty side as well. If prayer makes them feel better, thinking Satan is doing terrible things to them helps as well. [Or they merely imagine it helps.] Is that because thinking magical evil forces exist is based on assuming that good magical forces exist too and are more powerful? Are magical good entities and magical bad ones two sides of the coin of meaningfulness? If so, then faith in God is hardly to be praised. People feel they get power over evil by embracing it and is that what those believers are doing? Do they deep down hope that the evil beings will go away and torment somebody else?
If you believe that God hurts innocent little babies, you take it on faith that he knows what he is doing and in some way it is for the best. But it is only faith. You don't really know. You are looking up to a power that may be evil. You are letting yourself open up to evil. No believer denies that it is possible that the supernatural could be evil or could be doing good not because it is good but because it acts whimsically. It could as easily kill you as cure you. If your life has been good up to now, you don't know what it is going to do tomorrow. Faith in God is intrinsically a placebo - it relieves the fear of a random uncaring universe and a random uncaring God.
There is no shortage of religious people who secretly say prayers that God will hurt others. Others are more open about it. Some of those who try to do evil with prayer are telling themselves that God will protect their victims from too much harm. They reason, "I don't want to kill Mary but just want her to lose her car." They may reason that by asking for some calamity to befall her at least they could be saving her from a worse one. Some pray for wealthy relatives to die suddenly so that they might get the inheritance and they hope God will make it up to them for the tragic death in the afterlife.
Faith says that evil just has an uncanny ability to do unexpected damage. It warns it is a Pandora's box. It says that that is bad enough but bad people, Satan and the demons make an input to worsen it. In that light, praying for a person to be taught a lesson shows a blindness about what evil can do and is very immature and harmful. Such praying is surely very common. It even appears in the Psalms. If the believer will confiscate his child's sweets for bad behaviour, he will pray that way.
Belief in God is the problem for it opens the door to notions about demons, evil forces and toxic placebo attempts.