Is there any historical reasoning to the divergent paths that the West and the Middle East have followed?
Considering the Middle East was the intellectual powerhouse of the world for many generations, I wouldn’t think it has to do with intelligence. Is it just the rural nature of large swaths of that area that allow strong cultural traditions to remain in place?
I will debate this question's premise.
Countries in the Middle East are not necessarily the most religious countries in the world, nor are "Western" countries (which in itself is an extremely vague and problematic term) the least religious.
There seems to be a very broad inverse correlation between a county's GDP per capita and self-reported religiosity. By this standard, Middle Eastern countries tend to be a bit more religous than they otherwise are expected to be based on that correlation, but they are in the same area of self-reported religiosity as African states or India. The US has a similar rate of self-reported religiosity to Turkey and Lebanon.
Which is not to say that there aren't historic factors that influence a country's reported rate of religiosity. Russia and Ukraine seem to have lower rates of religiosity than would be expected from their GDP per capita, and this no doubt is related to 80 years of the Soviet Union being an atheist regime and weakening the public space for religion.
Vietnam and China also are lower-than expected in reported religiosity, and while this might have to do with Communist regimes these states also have very different histories of religion and religious institutions to countries such as those that historically were Christian or Muslim. Japan also seems to be in this camp with an exceptionally low self-reported religiosity.
I think that, if anything, while there is some truth to the Middle East being more publicly religious than, say, Western Europe, this is probably a difference of social and political movements in the twentieth century more than anything else. Separation of church and state wasn't codified into French law until 1905, for example, while public religiosity in Middle Eastern countries became much more popular after the defeat in the 1967 Six Day War and the discrediting of Pan-Arab socialism as a political force. Both Europe and the Middle East have had political forces in the 19th, 20th and 21st centuries arguing for secularism and for public religiosity, and the results of these debates have been shaped by contingent historic forces as well as underlying social conditions unique to each country. As such it's hard to generalize on a regional basis.