If you purchase a cable from somewhere else and it doesn't work with your iPhone, Apple will say "no idea, it's not our cable".
If your Apple custom USB-C cable doesn't work with your Android phone, Apple will say "no idea, it's not our device".
Apple only guarantees that an Apple iPhone can transfer data through an Apple (or Apple certified) USB-C cable. Nothing more, nothing less. They don't have to manufacture their cables to be compliant with USB-IF standards as the EU law is only about charging and not about data transfer.
The EU laws are to blame. The law should have been "the manufacturer will implement USB-IF compliant charging and connectivity" instead of "there will be a port that has the same form factor as USB-C that can be used for charging".
I believe the second revision of the law will be to this effect, which Apple will comply in 2030.
If you purchase a cable from somewhere else and it doesn't work with your iPhone, Apple will say "no idea, it's not our cable".
If your Apple custom USB-C cable doesn't work with your Android phone, Apple will say "no idea, it's not our device".
Apple only guarantees that an Apple iPhone can transfer data through an Apple (or Apple certified) USB-C cable. Nothing more, nothing less. They don't have to manufacture their cables to be compliant with USB-IF standards as the EU law is only about charging and not about data transfer.