But in the case of the iPhone 3G, AT&T's getting that money for providing cellular service. Apple's not getting it for providing software upgrades. After Apple receives its lump-sum payment from AT&T (your purchase price plus the carrier's subsidy), Apple doesn't see any further money.
It's the way they account for the iPhone money differently from the iPod touch money, that makes it legal for them to add new software features to the iPhone for free. (But that makes me wonder - how are they legally permitted to allow iPod touch apps in the app store, which add new functionality, to be offered for free?)
But there's another interesting observation to make here... Apple actually receives somewhere between $499 and $699 for a 16GB iPhone 3G. From their perspective, that's still between $60 and $260 more than you will have spent on your iPod touch, by the time you purchase OS 3.0.