Each country has different policies when it comes to unlocking. Locked phones greatly outnumber unlocked ones.
Take Chile, where phones must be legally unlocked by the telco or manufacturer to work WITHIN other operators in the country, but not necessarily abroad.
Buy an "unlocked" phone from a Chilean and you might get stuck with a brick.
The different and complex type of unlocking levels Apple has for its devices (and there are many) are designed to assist the Telco and any countrywide regulatory policies that need to be enforced.
There are many parts to this jigsaw puzzle.
Here in the France the telco are compelled by law to fully unlock any phone bound to their network 6 months after the purchase (or earlier if initial contract duration was lower than 6 month).
Apple comply gracefully to this law.