A man takes a selfie in front of the Electoral College map during a U.S. Election Watch event hosted by the U.S. Embassy at a hotel in Seoul, South Korea, November 9, 2016.Kim Hong-Ji / Reuters

The 2018 Texas Senate race between Ted Cruz and Beto O’Rourke ended with Cruz holding on for a narrow two-and-a-half-point victory, one of the closest Senate races this cycle. Most Texans, however, did not experience this race as a close one locally. If they had ignored statewide data and polled only their neighbors, Texans would have found evidence of a lopsided contest: O’Rourke won nearly 75 percent of the vote in Travis County (home to Austin) and in the 60 percent range in the counties containing Houston, Dallas, and San Antonio, while Cruz won 75 percent or more in a remarkable 151 of Texas’s 254 counties. Only 13 counties had margins of fewer than 10 points.

Such geographic polarization—where supporters of one or the other party cluster together in homogeneous enclaves, producing localities with lopsided distributions of political preferences—has been growing steadily in the United States since the 1970s. According to a recent paper by the economists Ethan Kaplan, Jörg Spenkuch, and Rebecca Sullivan, the U.S. is more geographically polarized today than at any point since 1860, when a geographic cleavage in political preferences was about to send the nation into the Civil War.

Political polarization manifests itself geographically in large part because partisan preferences are strongly correlated with population density. Most casual observers of American politics are aware that in recent election cycles, Republicans have outperformed Democrats in rural areas and vice versa in urban areas, but the density-partisanship connection is evident not only at this macro level but also at very micro scales. Work by the political scientist Jonathan Rodden has shown that within metropolitan areas, and even within places few would consider metropolitan—Muncie, Indiana, for instance—Democrats tend to live in denser areas than Republicans. This is a recent development: For most of the first half of the 20th century, the correlation between voting and density was zero.

What explains the rapid growth of geographic polarization in the United States? One popular theory, most famously articulated by the journalist Bill Bishop in his 2008 book, The Big Sort, is that Americans choose to live in neighborhoods where most residents share beliefs similar to their own. As Bishop writes, “Americans [have been] busy creating social resonators, and the hum that filled the air was the reverberated and amplified sound of their own voices and beliefs.” Residential mobility, as Bishop sees it, leads to echo-chamber neighborhoods where people can avoid interacting with anyone who disagrees with them on political issues.

In a variant of this theory, political sorting is an unintended consequence of sorting based on lifestyle attributes that, for whatever reason, correlate with political beliefs. Political tastes are simply brought along for the ride as conservatives who pine for three-car garages move to the suburbs and liberals who yearn for mass transit move downtown.

These theories are intuitively appealing, but they have two serious shortcomings. First, most people are highly constrained in where they can choose to live—by their job, their family, and the housing market. No matter how strongly a liberal new arrival to the Bay Area might like to live in the comfortable embrace of dense and left-wing San Francisco, unless she can afford the city’s sky-high rents, she’ll have no choice but to settle for the region’s sprawling and (relatively) conservative periphery.

Second, Americans move a lot. The Census Bureau’s Current Population Survey typically finds that around 12 percent of respondents moved within the past year. This high turnover rate means that unless partisans are much more likely to move to a co-partisan neighborhood than an opposite-party one, all that shuffling around would tend to homogenize and smooth out their distribution, like sugar cubes stirred into a cup of coffee.

Recently, we tried to measure the strength of partisan bias in location choices. We examined every registered voter who moved from one location to another within the state of Florida from 2008 to 2010 (approximately 1.1 million people), as well as an additional random sample of 50,000 voters who moved from one state to another from 2005 to 2016. We compared the new-neighborhood choices of registered Democrats with those of demographically similar independents and registered Republicans who moved from the same zip code. (We might, for example, have compared the new neighborhoods of two white, 45-year-old men who both moved out of the 33609 zip code in Tampa, one a Republican and the other a Democrat.)

Our results confirm that Democrats systematically choose denser, more walkable, and more Democratic-voting neighborhoods when they move than do Republicans leaving the same place. However, the magnitudes of these partisan biases are quite small.

Next, we ran a large-scale simulation in which the rates of partisan sorting that we observed in our study were repeated over several election cycles. We found that Americans move frequently enough, and the partisan bias in moving is small enough, that if it were the only factor changing the geographic distribution of political preferences, then geographic polarization would actually go down substantially.

Moving patterns, it seems, are not the culprit; there is no intentional big sort. So what explains the existence and recent growth of geographic polarization? One part of the story is the partisan realignment that began in the civil-rights era, which has dramatically changed the composition of the parties’ electoral coalitions. The political scientist Lilliana Mason’s recent book, Uncivil Agreement, documents how partisan identities now align with social identities (race, religion, education level) far more closely than they did in the era when southern segregationists shared a party with northern labor. The shift of southern whites and, later, whites without a college degree to the Republican party has left Democrats as the party of educated white voters and racial minorities. Because both of these groups tend to live in cities, the realignment has increased geographic polarization without anyone having to physically move.

Another part of the story is that places may change people more than people sort into places. Our study found that people who move tend to adopt the partisan leanings of their new locale. Examining voter registration data, we found that Republican voters who moved to more Democratic-leaning areas were more likely to change their partisan affiliation to the Democratic Party, compared with Republican voters who left the same place but moved to relatively more Republican-leaning areas, and vice versa for Democratic voters.

It’s not entirely clear why a change of scenery would lead to a change of heart. Perhaps social pressures lead people to conform to the beliefs of their neighbors. Alternatively, the experience of living in a new context might lead to a sincere revolution in partisan preferences. Much of American migration is economically driven, as people move to places with better job or educational opportunities; taking a new job in a different city or a different industry may alter an individual’s economic interests and may therefore also alter his political leanings.

Regardless of the exact mechanism, our analysis implies that partisans are not walling themselves off in homogeneous enclaves. Individuals’ party preferences are malleable; the fact that we observe a geographically polarized electorate does not imply that there must be strong partisan biases in location choice. In fact, Americans move for a complex and varied set of reasons, most of which have nothing to do with political or politically adjacent tastes. Commentators concerned about the geographic divide in U.S. politics should stop blaming voters for sorting themselves on partisan lines, and instead encourage party elites to invest in expanding their parties’ appeal outside their respective geographic bases.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.