I can see that. For some, religion is their identity. No matter what, they will always come back to it. It's what they know. And considering individual circumstances, I can see why it might be difficult to throw it away.
That too but what I meant is that when you say Muslims stone those that partake in homosexuality or the like, it has to be narrowed down specifically to who you're actually referring to.
There's tons of other factors that come into play as well. The literacy rate for instance, in that part of the world is extremely low. Most of these people can't read or write in their own language so they certainly don't know any Arabic. Their knowledge of their own religion is what the imam tells them.
You might have heard of General Zia-ul-Haq, a former military dictator that came into power in the 70's. He used to send out religious clerics into towns and villages across Pakistan to win support. He used religion to radicalize and recruit people to join the Mujahideen in Afghanistan. I can only speak for Pakistan but I'm sure similar things have happened and go on in other parts of the Muslim world.