People were more willing to express potentially prejudiced attitudes when their past behavior had given them a bit of credentials as a nonpredjudiced person.Bizarrely, Hanson cites recent polls that Americans are more in favor of gun control, less in favor of legalized abortion, and fewer people believing global warming is the result of human activity as evidence of this theory. What does racial issues such as affirmative action have to do with climatology?
People care what others think of them, even if those others are strangers. We care about it so much, we say we believe things we don't believe. If we value the truth on an issue low enough, ewe even fool ourselves into believing things we'd normally conclude are false. (Bryan Caplan calls this rationally irrationality.) In essence, we are paid (in the form of social capital) to conform.
The reason why we care so much about we others think of us is that we care what others think. We like to associate with people who are like us, a trend easily seen in grade school, high school, college, and beyond. This isn't merely shared interest but political opinion and values; constantly arguing with someone about politics gets exhausting for most people. It also makes it easier to talk to people since there's more common ground and you don't have to police your offhand comments or jokes.
There are lots of issues, though, and it's inefficient to list off your opinion on all of them. This is why we use labels (to the annoyance of some), such as Democratic, Republican, Libertarian, Populist, Christian, Muslim, Atheist, Jew, Protectionist, Free-trader, etc. In a single word, we convey a body of opinions to potential friends or mates. This is why it is normal for dating sites to post a person's political affiliation: it's a cheap way to convey important information.
But it's not perfect. Some issues are more important to some people than others and individuals are more diverse than the label's official or perceived hierarchy of priorities. We want to connect with people that share what we care about, starting with top priorities. People will then adopt most of the views of one group, including views they don't believe, to signal that they believe things that they find very important and distinguish themselves from the group that seems (rightly or wrongly) to disagree with them, even if they secretly agree with that group on less important issues. When an event convinces people that most agree with what you find to be really important, you will more accurately express your view of the less important things since you are less afraid of being mistaken for some other group.
To illustrate, consider two parties: D (Democratic) and R (Republican). Also consider two issues: A (being for racial equality) and B (being for less gun control). ~A means, then, that a group is perceived as being against racial equality and ~B means that a group is perceived as being against less gun control (or in favor for more gun control). Before Obama, one could argue that the public views the parties as so:
D (A, ~B)
R (~A, B)
Consider a person who has the preference of (A, B), but cares much more about A than B. In other words, he'd rather spend time with a person who's restricting gun ownership and is racially tolerate than a racist gun nut. U(A, ~B) > U(~A, B) (U stands for utility, economic lingo for satisfaction.) Thus, he will adopt policies of both racial tolerance and gun control to better signal that he's a Democrat, making it more likely he'll spend time with his preferred type of person. He might even start believing B, since he'll have to argue the point at parties and it's easier to argue something if you fool yourself into believing it's true. (This is where the rational irrationality comes in.)
But suddenly, Obama is elected president and it starts to look less like ~B is a staple of group R. If so many Americans were racist, it's hard to believe a black man could win (especially since he got 52.9%). Thus, the public perceives racism as being uncommon enough that it isn't a defining attribute of a major political party. At worst, the public's opinion on the stance is uncertain and the perception changes to this:
D (A, ~B)
R (?, B)
Now back to our hypothetical (A, B). No longer concerned with openly believing B will attract ~A people, he expresses his B opinion (or overturns his previous ~B opinion). He is no longer afraid of being mistaken for R.
In practice, there are more than two issues and people might still call themselves Democrats out of habit, fear of losing current friends, or because there's still enough about the party they like. But, in time, more will be willing to. In the meantime, expressing the secondary opinion will be more common. So, here's the punchline: Obama's election made Americans, and by extension moderate Republicans, seem less racist. Thus more people are willing to be seem as (or mistaken for) a Republican.