According to the New York Times it is more than just self-selection. There is also screening:
“The tendency of liberals to pursue advanced education isn’t a result of higher I.Q. or less materialism or any such indirect factor,” Dr. Gross told me. He pointed instead to a direct factor: the liberal reputation of the profession since it came of age in the Progressive Era. “The liberalism of professors is explained mostly by self-selection,” Dr. Gross said, arguing that conservatives avoid fields with reputations that don’t fit their self-identity.
But many conservatives insist that a liberal reputation wouldn’t dissuade them from taking a gig with tenure and summers off. The self-selection theory doesn’t satisfy Peter Wood, the president of the National Association of Scholars, a group critical of what it calls liberal bias in academia. Dr. Wood, a political conservative, is a former professor of anthropology and associate provost at Boston University.
….. Dr. Wood wrote. “If it comes down to it, entry can still be impeded through other techniques, the feminist and the multiculturalist vetoes on the faculty search committee being the deadliest as far as conservatives go, although there are others.”
…….. If you were a conservative undergraduate, would you risk spending at least four years in graduate school in the hope of getting a job offer from a committee dominated by people who don’t share your views?