AT&T doesn't care if you sell your phone, if you throw it off a bridge, or stick it in your drawer and change to using a Blackberry. They just care that you pay your bill for the period of your contract.
However... If you don't pay your bill and fulfill your contract, guess which phone is going to get blacklisted (and rendered useless) on AT&T? Not your Blackberry that you're currently using. It's going to be the iPhone that you obtained at a discounted price. The fact that the iPhone is in 17 pieces or no longer in your possession doesn't matter.
C