Your SIM stores your location so that during a power on cycle - or coming off airplane mode - it can more quickly find your network. If this data is corrupted or your SIM can no longer store it, the search for a network can take quite some time.
Here's the relative section from Wikipedia which is pretty accurate:
The SIM stores network state information, which is received from the Location Area Identity (LAI). Operator networks are divided into Location Areas, each having a unique LAI number. When the device changes locations, it stores the new LAI to the SIM and sends it back to the operator network with its new location. If the device is power cycled, it will take data off the SIM, and search for the previous LAI. This saves time by avoiding having to search the whole list of frequencies that the telephone normally would.