I think it's the residue of declining religious participation.
In the West, the number of people who identify with a particular religion is declining every year. Even in the United States, which is considered a very religious nation. That is especially true with all Christian faiths. However, what we are seeing among some of the more devout followers of these faiths, is a growing orthodoxy as they are pushed more and more to the margins of mainstream society.
I believe that parallels changes in the Islamic World too; as both Western culture and technology spread throughout the world. While most absorb different cultures into their existing mores, some refuse. They turn to fundamentalism. There are other social factors in the non-Western world that are hard for me to delve into here. But that I believe is the heart of the problem. What else explains upper middle class, highly educated young men attacking a restaurant in Dhaka?
So while the overall population of the faithful declines, those left are becoming more and more reactionary. Their violent acts make it appear that they are growing in number. Time is on the side of the modernists.
Great question. Sharing.