ATT makes additional revenue by charging the same rate if you have bundled a phone with your service plan or if you are using your own unlocked GSM phone.
Tmobile, the other significant GSM carrier in the US provides a $20 a month discount for (and does not require a service contract) when the customer does not bundle a phone with their plan.
In the US ATT is the exclusive iPhone carrier and unlocked GSM iPhones are not available. Thus the price of the iPhone is $49, and it's cost over the course of a 24 month contract is $899 because of the terms required by ATT's standard agreement.