Here's the thing. I'm only mostly talking about iPhones in general. When you buy an iPhone on contract you buy it subsidized, so of course the carrier wants you to fulfill your contract so they get their money back. Most carriers will unlock your iPhones/phones after your contract is fulfilled (after 2 years in most cases).
The way I see it there are two reasons for unlocking your iPhone, you want to use it out of the country, or you want to use it on other carriers (and by extension want to raise the resell value of the phone). The first reason is legitimate and for the most part, with what I've read is they will unlock your iPhone for you. The second reason is more iffy, if you want to use it on other carriers or sell your iPhone for the most money then you would get it unlocked but then you wouldn't be fulfilling your contract and your carrier has to eat the cost of the subsidized phone.