Strictly speaking, it costs Apple nothing to run third-party software on your device. The closest thing to a compulsory fee is whatever Apple has to pay for the notarization process (which is pennies on the dollar).
> So isn't this fee just an extortion attempt?
That's up to the courts to decide, but Apple certainly hasn't painted themselves a favorable picture. When Dutch regulators tried pressing them to include alternative payment services, Apple continued demanding 27% of those transactions. Their disrespectful and obstinate behavior in the Netherlands is what made the DMA such an urgent act in the first place.
So all this will be well-worth keeping an eye on. The iPhone already turns record-breaking profits off hardware sales alone, it will be difficult for Apple to argue they're inherently deserving of taxing aftermarket transactions. At this point, "0%" is starting to seem like the only logical software fee for iOS.