system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: The method to the madness of country codes (+1, +44, +358 etc). What's the actual pattern, if any?
gpt
There was a bit of politics to the pattern. 1 for the USA down to 7 for the USSR at the time with other areas being given intermediate numbers. Africa is 2, Europe is 3 and 4, South America is 5, Australia is 6 and China is 8.

Individual countries within those are split further. They're normally given a smaller number based on the size of the country. USA's country code is 1 for example, UK is 44, and Iceland is 354. 

This is because there was an agreement to try and keep international telephone numbers to eleven digits or less, so the smaller a country is, the fewer digits it needs left in order to be able to dial every possible number in that country, including all the local regional and area codes. So the bigger countries need more spare digits, hence the USA having just 1. 

Everything sort of fit over the years around that one concept.