Facebook advertising does not run on iOS. It runs on the servers maintained by Facebook. As part of the service provided by Facebook, they are allowing users to pay for boosting and advertising through the app. Apple thinks that because the app used is on an iPhone, they deserve 30% of Facebooks as revenue, which is insane. People on PC’s, Android phones, Macs etc will also see the ad if they are accessing Facebook.
If you use the Amazon app to make a purchase, Apple doesn’t take a cut. They allow users to give their credit card information directly to Amazon, because Apple has no part in delivering the goods to the customer. Just like they have no part in delivering the boosted Facebook post or ad.