What is the price of devices for then? It's a sane expectation that when you buy a device with a preinstalled OS, you pay for both the hardware and the R&D costs for the OS.
Apple sets prices and there’s no reason they need to charge customers for the R&D costs of supporting public APIs. In fact, if they charged developers per call, maybe customers could pay less. It used to be pretty standard to charge for better application development frameworks. Heck, people used to pay for compilers!
I remember how Microsoft wanted non-insignificant amounts of money for its official SDKs and Visual Studio (and I always pirated them).
But Apple always offered Xcode for free and, iirc, some Macs even came with an Xcode installation CD in the box. But major macOS updates were also paid back then. But the version that came with your computer out of the box was still free. So no, I feel like "we need the $99/year and the 30% to support the R&D cost of our APIs" is a mostly made-up excuse. It's not like Apple would operate at loss if they remove the $99 and 30% fees tomorrow.
What I'm saying is that Apple can fuck around and find out. 2 years ago there weren't protections for arbitrary digital market gatekeeping, now there is. If Apple wants European market access, being the vanguard for the World's Dumbest pricing model is a bad start.
Remember: Apple is considered a gatekeeper for app installation regardless of the cost they pay to maintain the platform. Charging per-call on a literally free API would be so profoundly stupid that it would force a second Digital Market Act.