Because of how many there are now. Phones used to have 2 or 3 digit numbers. As phones became more common, of course, they needed more numbers.
The original first three numbers defined your location. Those were the ORIGINAL area codes. Long distance meant dialing a 1, then that 3 digit "code", then the specific number. So, 1,000 "areas" (000 to 999) and 10,000 numbers (0000 to 9999) per area - written as XXX-XXXX - as cities grew.
Once again, over time, more and more phones were used. It's hard to find someone who DOESN'T have a phone now...plus there are cell phones, so each area code now represents the area, with 7 "other" numbers to play with and configure so 000-0000 up to 999-9999 gives a total of 1,000,000 combinations per area....and due to the amount of people in any given area, larger cities often have 2 or 3 area codes now...and several cities are adding even more!
The format we use just makes it easier for clearly seeing the number.