Apple's libraries are licensed to developers under whatever license Apple chooses. They could require a certain revenue share regardless of which payment gateway is used. Heck, they could license it under the GPL and require all developers who build programs against their libraries to release their source code. It's their code, it's up to them.
Similarly, Epic Games can decide when developers might have to pay Epic for software they distribute with Unreal Engine. Whether it's a flat fee, a revenue share, a profit share, if there are discounts or incentives—all of that is entirely for Epic to decide.