That said, if the data is available in your iCloud backup in a form that can be read by other devices, Apple can presumably extract that data under subpoena. If it's in your iCloud backup but encrypted with a per-device key (like your non-iCloud keychain entries), Apple cannot extract that because decrypting the backup (which they can do) isn't sufficient to decrypt this per-device-encrypted data.
All that said, if the government wants to know your spending history, it would be simpler just to subpoena Goldman Sachs.
Australia's does now.
Altering the OS to install a backdoor is a much different beast. It's non-optional, fundamentally weakens the security of the entire OS, and affects all customers everywhere, not just Australian citizens.
Also, if Apple did withdraw from Australia, any Australian citizen who wished to use an iPhone could still acquire one from overseas (though this is admittedly a fair amount of effort) and they'd continue to have a secure computing experience.
Source? Iām pretty sure the legal system does allow that.
I don't have a direct citation for you, besides having seen this spoken about before, but a simple thought exercise should prove it: If the government could compel that sort of thing, then we wouldn't have end-to-end encrypted chat (including iMessage) and the government would have already compelled Apple to give the government a backdoor into iPhones.
The FBI took a different view in a recent court case referencing the All Writs act of 1789 https://en.wikipedia.org/wiki/FBI%E2%80%93Apple_encryption_d... but dropped it when they unlocked the device by other means., and the issue hasn't really made it through the court system, so it's unclear what the law requires.
Until a federal case gets to the appeals court level it basically won't establish any binding precedent in other cases under stare decisis.