In the USA, not only did the area code used to be specific to a given location, but the
prefix (first 3 of 7 digits) used to identify the
zone you were in within a prefix. Your "local" calling area (numbers you could call without per-minute charges) was determined by your prefix and would include numbers in prefixes that were within your zone. IIRC, a prefix was in your local zone if any number within it was within 15 miles of any point of your zone. Local phone books would list the prefixes that were local calls and those that were in progressively farther zones (with corresponding per-minute cost increases).
I set up cheap calling systems for nonprofits back then. Three well-chosen calling points could cover all of the greater San Jose area (including southern Fremont and up through Menlo Park) with purely local, free calls.