It's only with an iPhone you can walk into an apple store, and walk out with a brand new one, just because there are purple spots on your camera lens that are unremovable.
Giving you a brand new device when, all there is wrong with the device is the camera, costs money.
You're not alone. Over 90% of world iPhone sales are in regions with subsidies, where people are only paying $200 or less upfront. No doubt this is true of all high priced phones.
Ironically, back when Apple dropped the price of the original iPhone from $600 to $400, with the possibility of even more cuts later on, owners were furious that the value of their purchase had been so rapidly devalued.
The next year Apple switched to the subsidized model, which hid the fact that the actual price had increased again.
Since tablets are rarely sold with a subsidy, manufacturers cannot charge as much and also keep sales up.
Technically speaking the iPhone has the highest profit margin of any mass produced smart phone available. I say mass produced because there are a couple gold phones and things like that with a higher profit margin.
With an iPhone you are getting the least hardware at the highest price. Wrapped in a pretty package with generally a pretty high user experience albeit not that innovative.
This is how Apple has so much money in the bank. Shouldn't be a surprise, when you sell less product for the same price as the competition but have more profit your marketing team needs a bonus.