You might have a point if that App Store always had a in-app purchase mechanism, which it didn’t.
The app-store wasn't even there when the phone was launched!
The initial model for iPhone was that third party devs could make web apps not 1st party apps. Apple were going to supply all 1st party native apps.
Then they relented because there were devs who were jailbreaking the thing to put their own apps on there. Apple decided that it was SAFER (remember that key part) to allow an appstore in where they reviewed stuff and gave the devs a sandbox to run in. Thats why side loading even now is a no-no for Apple.
Please remember that they'd already spent years making iPod's which were all closed systems and only apple supplied apps and the few games that were there. The intention for iPhone was never the App Store because of how burnt Jobs was with fixing security / performance issues on Mac OS (because it was open).
The in-app purchase came in as devs asked for the feature. Remember the App Store model: Apple were offering to list your app, review it etc... for free if it was free to consumers (sans the $99 dev membership cost). And if you charged for your app they want 30%. This a) grew the amount of apps on the store rapidly as people published apps for fun or whatever. Also, the paid apps subsidised the cost of processing the free apps.
Then companies realised if they gave there apps for free they could charge people in-app instead and make more money. A normal 3.99 game ended costing player 100's of dollars in in-app gamification. Eventually games didnt want to charge and they just wanted to be free, breaking the model of paid apps subsidising free apps.
Thats why Apple said, if your using our service to distribute your app for free you cant then just take the money from in-app purchases or external payment stores and not give us a cut because your a) breaking the subsidy model b) we got that game in front of the customer for you in the first place!
Apple felt that they were providing the opportunity here and were doing it for nothing. So they made the rule.
Companies like Amazon and Netflix already had huge businesses outside that were providing value to Apple (by letting their customers pick iPhones) so Apple's thinking changes for companies that are helping them out. But thats about it.
I think the history of the whole thing helps give context instead of making out that Apple is some greedy company all the time.