First one is always heppened to all the SIM card sold by operator. In this case, you have to finish your contract to get the SIM card unlocked. After that, you can use this SIM card for any kinds of handsets. This case so far is seldom used by operators as it still brings AURP to operators as long as this SIM card sitll registers their network.
The concept for second case is quite the same as the first one. You get free handset with blabla years contract. And this headset can only be used as the SIM cards with operator brand. When your contract is finished, you can have this handset unlocked with different brand SIM cards.
SIM card is bundled with handset.
It ia a very stupid approach for cutomer. You have to get the contract finished to switch operators. Not sure whether you can get a SIM card then.