I have observed hindus, muslims, christians, jains. My observation so far is, religious fervor is directly to 2 factors.
1. is that religion a minority in a given state ? 2. whether you grew up in prosperity (not wealth, but above middle class)?
societies which are poor tend towards fundamentalism. religion gives some sort of escape place where poor might forget their harsh reality and usually its provides some sort of alt-reality that their after life is going to be good. rich people who already seen those comforts dont search for such answers.
Also, if that particular religion is minority in a country, the religion offers companionship and keep the group close. also, it forms the main identity of that group which is difficult to get away from.
for the above reasons, In india, there are a lot of atheist hindus, but not many athiest muslims or atheist christians.