A recent article in The Economist reports on the conclusions of researcher Corey Fincher, who thinks that the proliferation of religion is a cultural response to disease (as opposed to famous atheist Richard Dawkins's assertion that religion is the disease). Basically, those who share a religion stick together and away from other religious groups to avoid being contaminated during disease outbreaks.
Perhaps it was the way before easy access to information and global travel. Back then, sticking with 'your kind' was safer from a public health point of view, but these days, I think it's just a way of excluding others.