An old rotary dial telephone resting on a directory, c. 1930s. ClassicStock / Alamy

A version of this post originally appeared on Tedium, a twice-weekly newsletter that hunts for the end of the long tail.

From a distance, at least, there seems to be no rhyme or reason to the way Americans got their telephone numbers. And it’s becoming even less clear thanks to the increasing sophistication of the phone technologies we use. To understand the reasoning for the current telephone area codes, it’s worth keeping in mind two things: the way that population levels differ from state to state, and the basic design of the early system.

The North American Numbering Plan, which the Bell System put into place starting in the 1940s, was designed to replace a far-more-complicated system that relied on operators to manually move calls through the system. The phone company wanted to make it possible for anyone to call anyone, anywhere, in an automated way.

Initially, this was sold as a boon for operators. “In a few years long distance operators will be dialing calls, directly and unassisted, straight through to telephones as far away as the other side of the continent,” exclaimed a 1945 statement from Northwestern Bell published in the Minneapolis Morning Tribune.

The truth, of course, was that the goal was to remove operators from the equation entirely—because there would never be enough human operators to fill the inevitable need. Requiring human interaction just to dial a number from a certain distance created artificial limits on how big the system could become.

To help with this, Bell put together an array of 86 separate areas, called Numbering Plan Areas, across North America. According to telephone researcher Linc Madison, 34 states and D.C. had just one area code each at the time, while New York State had five and a single area code covered three Canadian provinces. At the time, Alaska and Hawaii were not states and did not initially get a long distance code.

But the question, of course, is how to organize that system. And that’s the part, from the outside, that doesn’t seem so clear—especially compared to other large, national apparatuses. The U.S. Interstate system, which has odd numbers going north and south, even numbers going east and west, and highway numbers that grow higher in value as you go further east or north, has a clear logic to it, even if it sometimes veers from this logic. Likewise, the first three digits in the U.S. ZIP Code system get higher the further west you go.

A 1905 advertisement for installing a “residence telephone”. Public Domain

In comparison, area codes within the North American Numbering Plan don’t break down quite so neatly. That’s because the real factor here wasn’t geography, but population need. As shown by this map, Bell appears to have based its initial decision-making on area codes with an eye toward future need.

The real tell, in this sense, wasn’t the first number in the three-digit area code; it was the second. Initially, every area code installed had a second digit that was either a 0 or a 1. States with more than one area code generally had a 1 as a second digit (hence why New York City’s most common area code is 212), and states with a single area code generally had a 0 in the second digit (hence why Florida has the 305 area code).

“A single [numbering plan area] for a state or province (Canada) is the most desirable arrangement from a customer dialing viewpoint,” explained Notes on Distance Dialing, a 1968 document by AT&T. “For this reason, the NPA boundaries were drawn coincident with existing state or provincial boundaries whenever it appeared that the ultimate central office code capacity for a single NPA would not be exceeded.”

This structure meant a couple of things: First, it was a bit of a godsend for people dialing on rotary phones, because it made the most valuable area codes the easiest to dial, making analog dials easier to push around when making a call.

This is highlighted in terms of who got the most popular codes. For example, California initially got the area codes 916, 415, and 213. Los Angeles, of course, got the area code which required the fewest number of clicks on the analog dial. Chicago, likewise, got 312, and Detroit, 313. The largest and most prominent cities got the best codes, while smaller states had to drag the zero all the way around, almost as a punishment of sorts for not being bigger. (With 202, the District of Columbia got the best possible area code it could have.)

But more importantly, it meant that the system was built with a degree of future-proofing. By leaving out numbers higher than 1 on the second digit, that meant that numerous area codes would be available in the decades to come, in case growth spurts hit and suddenly your state needs a lot of area codes.

A telephone switchboard, early 20th century. Library of Congress/ LC-DIG-matpc-08794

Beyond that, there wasn’t really a specific order to how the area codes have been doled out, although there seems to have been a genuine effort made to avoid putting similar area codes next to one another. One of the few examples of abutting codes on the 1947 map is Virginia (703) and North Carolina (704). As highlighted by this 1960s-era map of numbering codes, the two codes were quickly separated.

This system wasn’t perfect, but its design suggested the work of engineers who knew the rule book would eventually be thrown out.

Of course, the hard part about all these changes was selling them to the public, and on that front there was some resistance—including some from a future political leader.

S. I. Hayakawa, an English professor at San Francisco State College (and, later, a U.S. Senator), was among the leading voices in the Anti-Digit Dialing League, a group formed to resist efforts to move away from phone numbers partially based on memorable telephone exchange names.*

The group, formed in 1962 with the help of a want ad, fought the idea of moving away from this letter-based system in part because it felt longer numbers would be harder to remember.

“We have all numerals for our Social Security accounts and all numerals for our bank accounts; but we don’t have to memorize our own,” Hayakawa told UPI that year. “A telephone number is different. It is an address and we have to keep addresses of friends and business contacts in our heads. As psychologists have shown, the seven-numeral system goes well beyond the average person’s ability to memorize.”

The group fought the effort in court, but despite winning an early round, ultimately lost the battle, as proven by the fact that numeric phone numbers and area codes are everywhere.

Changing the lines on a telephone pole, c. 1940. National Archives/ 285872

The system is full of quirks, of course.

Certain area codes, such as those with repeating digits, are set aside by the North American Numbering Plan Administration for special purposes. You use some of these numbers, like 800 numbers, on a regular basis. Other such numbers are being held aside from use. The Industry Numbering Committee, which manages numbering issues in regards to the phone system, specifically sets aside two large blocks of area codes, 37X and 96X, for “unanticipated purposes where it may be important to have a full range of 10 contiguous codes available.”

And there are some edge cases in which territories that are part of European countries are included in the numbering plan. Back in 2011, for example, the Caribbean island of Sint Maarten, a constituent country of The Netherlands, was granted the 721 area code after using its own country code for decades. Notably, the Caribbean Netherlands and Curaçao, also Dutch, still use country codes. (Similarly, the Danish territory of Greenland, while part of North America, uses a separate country code.)

This goes both ways—some of the most remote parts of the U.S. have a traditional area code despite being nowhere near the U.S. mainland. American Samoa (area code 684) is more than 4,800 miles away from California, and both Guam (area code 671) and the Northern Mariana Islands (area code 670), are nearly 6,000 miles away.

A Manhattan Telephone Directory from 1940. New York Public Library/ Public Domain

The decisions made with area codes early in the history of the telephone system have deeply impacted everything that’s come since.

It seems apparent, in hindsight, how inefficient the process actually was. At first, the breakdown of area codes stayed relatively stable, but as we started using telephone lines for more things—modems, fax machines, pagers, and later, mobile phones—the crunch became more apparent. By 1997, Maryland had to switch to 10-digit numbers for local calls to make room for all the extra demand. Cities like New York found themselves having to rely on multiple area codes over a small area.

And that trend continues today, with some areas running out of numbers for their longtime area codes. Even areas that had long managed to stick with seven-digit phone numbers for local calls, like Albany, New York, have found themselves recently having to make the switch to 10-digit numbers. (Just imagine how the Anti-Digit Dialing League would feel about that.)

The result of all these changes is that looking at the map of area codes, particularly this version designed by Linc Madison, feels exhausting. Area codes that once covered entire states now represent tiny portions of that state. It’s kind of like watching cell division happen in real time.

All of this has had a strange effect on identity. In a 2014 piece on area codes, The Atlantic’s Megan Garber made the case that smartphones have turned area codes into regional identifiers, especially for people who move.

“Long ago divested of its original role, the three-digit code now functions as a kind of shared social media handle, a collective identity,” she wrote. “It’s no longer something to be remembered—we have our phones for that—but is instead something to be talked about.”

This probably explains why there’s a company that actually sells 212 numbers to people who really want a New Yorker identity—as well as why there’s resistance when new area codes get introduced, overlaid on top of old ones. In 2015, the addition of the 628 area code in San Francisco, famed for its 415 code, led to a lot of heartache from locals.

A view of a row of operators at Chesapeake and Potomac Telephone Company. National Archives/ 522875

As time goes on, however, it’s going to become harder to keep this old integrity in check. NANPA has already given itself an out: When we inevitably run out of the current numbers we have, the administrators will push us toward adding yet another number to the current lineup of 10, plus one more for the country code. It already has a number set aside for this reason.

These days, area codes get added to the system all the time—and codes that once represented entire states now make up a single city’s metropolitan area.

As populations have grown and people increasingly use telephone numbers for a variety of purposes, the logic of the area code system seems harder to grasp than ever. That logic, while a little cloudy in the 1940s, made at least some sense once you broke it down. In 2017, good luck trying to apply it to the myriad number of codes you’ll find around the country.

So, what’s the best explanation as to why one area code gets used over another in a given area? To put it simply, it was the code that was available.

*Correction: This post previously stated that the Anti-Digit Dialing League formed in response to the development of area codes. It formed in response to the replacement of word-based telephone exchanges with all-number dialing.

A version of this post originally appeared on Tedium, a twice-weekly newsletter that hunts for the end of the long tail.