> What law in any country requires this?
Any sane antitrust laws require this. Not that they have to provide compatibility, but they cannot inhibit compatibility. But that's what they do.
> Apple is not a public utility and people don't have rights to access.
Your iPhone doesn't belong to Apple and Apple trying to retain ownership control over it after they've sold it is the evil to be prevented.
> I am arguing that incompatibility is there, could be resolved if the companies chose to.
There are two different kinds of incompatibility.
One is, each model of car has its own type of oil filter, which is an inconvenience but then the third party suppliers just produce all the different kinds, and filters with different specs legitimately should have different interfaces and then you're going to have 100 different filter interfaces regardless and it doesn't matter much if you then need 100 SKUs or 250.
The other is, they purposely thwart compatibility by actively inhibiting third party interoperability, even when the third party is willing to support the vendor-specific interface. There is every reason to prohibit the vendor from doing this because there is no legitimate reason to do it, but a strong illegitimate motive for them to do it in order to inhibit competition.
A strong heuristic for telling the difference between these things is, what percent of the ancillary market is controlled by the seller in the primary market? Third parties being excluded in practice strongly implies malfeasance.