Why did the exclusive iPhone partnership between ATandT Cellular and Apple end?

When the iPhone first launched it was unsure if it would be a success, so AT&T agreed to finance the project in exchange for a contact. Once the contract ended the popularity of the iPhone indicated that there was more profit to be gained through a nonexclusive deal.