They want money; the contract is where they make their money - phones cost comparatively little, which is why they give them away like candy. If you're locked into a contract, they KNOW they will be getting money (unless of course you're willing to risk your credit rating), so they practically give the phone away.
It's one reason I switched from a CDMA carrier to a GSM carrier (one that uses sim card technology). The sim card doesn't care what phone it's in, as long as the phone is unlocked, so you can change handsets any time you want.