You have to consider how things are on underdeveloped countries: people live their whole life without ever laving their city, cities have small populations and many are relatives, people develop wrong concepts that they just don't want to question because "everybody they know has been do it that way forever". Populations develop bad habits and keep them, the lack of contact with other cultures makes them think everything different from what they are used to is wrong. That is how you get a significant population of a country to be unashamedly homophobic, atheophobic, xenophobic and develop religion-related prejudices.