Pin 5 (the unconnected pin) is programming voltage input, used only when writing identity information to the SIM.
These chips are preprogrammed when manufactured, and the programming voltage pin is left unconnected when placed in the carrier so it's impossible to re-program the SIM card once made.
In older times, it was possible with the right hardware to reprogram a SIM card to (for example) have two SIM cards report the same mobile number, so you could essentially clone a phone number onto multiple handsets instead of having to pay for multiple cellular lines. These newer style SIM cards prevent hacking like this simply by making it impossible to reprogram the SIM by not being able to power the programming circuit.