It is a very nice question. Let’s start with a short story.
Once, there was a small village where people were free and living happily. A cunning man came there and told those innocent people that they should worship God. He told them that he knew every ritual and can bring God’s blessings for them so that they would become happy and rich. They replied that they don’t need God or gods. As they were happy, wealth and free of vices, worshiping of God was unnecessary for them.
The cunning man was disappointed, but he soon discovered a new idea. He told them God will save them from Satan. This generated a sense of fear in their heart. Eventually, they became religious.
We humans don’t like to be blamed for our misdeeds. So, Satan is blamed for every bad act of us. Even God was not powerful enough until the birth of Devil. People were not worshiping gods or God until an opposite force came into existence. The name of Devil is enough to instigate a sense of apprehension and doubt in the minds of people.
We don’t like to take responsibilities of our deeds. It takes lots of courage, sensitivity, awakening of mind and a sense of self-respect to face angry people when they realize what one has done. We all wish to avoid consequences of our acts. It hurts our ego and also generates a sense of fear in our hearts when people blame us for our crimes and sins. A rapist would not like that his mother, sister or daughter came to know what he has done.
However, one can face other people’s criticism relatively easily but the worst thing is our inner self. It is very difficult for a person to face his/her inner self. Only strong personalities can admit their mistakes and crimes. People don’t like to fall into disgrace because of their acts. They can’t make eye contact with their inner self. People are not so courageous, generous, sensitive and full of self respect. That is why people search for a scapegoat whom they may blame easily and mitigate the consequences of their crimes and sins. This scapegoat is Satan who never comes forward to witness. People know this well so they don’t hesitate to blame Satan for their bad acts.
Because they do not want to take responsibility for their actions. That's when you come up with all manner of excuses. Blaming some bogeyman instead of putting the blame where it squarely belongs is one way to maintain a positive self-image in spite of having committed some reprehensible act. I don't think there is a single place on Earth where "the Devil made me do it" is a valid defense in court, however. At least I hope so.
After seeing this question, first thing comes to my mind is people who are mentally stressed blames that they have ghost inside them which makes them do all bad things. They will not accept their mistakes. instead , they put the blame on devil. There are some people who will be so torchered in family and has so much of anger on family members those people sometimes hurt the family members and put the blame on devil. Some may scold or beat others in anger but after they realise its wrong , they mention a statement like it was not me it was some devil made me to do all those things as if they were helpless. psychological reasons or health issues is fine but people who are intentionally acting or putting the blame must not be trusted. We must not support those people and believing those kind of thoughts.