Conor Friedersdorf has a theory:
To me, there are better explanations for the fact that "the more university education a person receives, the more likely he is to hold secular and left-wing views." One is that people who attend college leave home. That is to say, they leave their church, the community incentives to attend it, and the watchful eye of parents who get angry or make them feel guilty when they don't go to services or stray in their faith. Suddenly they're surrounded by dorm mates of different faiths or no faith at all. For many of these students, it turns out that their religious behavior was driven more by desire for community, or social and parental pressure, than by deeply held beliefs.