Phone number portability?
I can only assume you're in the USA, as elsewhere, certainly in Europe, the right to keep your number and take it anywhere you like has been the norm for several years.
The only lock in is when the phone is knobbled to prevent it connecting to another network (this is pure software level, the European market doesn't have any weird networks running systems that require completely different radio hardware like the USA). This carrier lock is annoying, but removable, either by paying a small (but still excessive fee considering how much you have spent during your 24 month contract) to your carrier at the end of your contract, or by visiting a little man in the local independent phone shop who will do it for you for £5. Or you just buy the phone in the first place.