There's a little thing called a "subpoena".
At one time, there was an ugly battle between the government and Apple regarding unlocking phones for LEO and having some "backdoor" code installed.
In fact, seems the UK has such a case going right now -
U.K. orders Apple to let it spy on users encrypted accounts
Updated February 7, 2025
By Joseph Menn
Security officials in the United Kingdom have demanded that Apple create a back door allowing them to retrieve all the content any Apple user worldwide has uploaded to the cloud, people familiar with the matter told The Washington Post.
Get concise answers to your questions. Try Ask The Post AI.
The British governments undisclosed order, issued last month, requires blanket capability to view fully encrypted material, not merely assistance in cracking a specific account, and has no known precedent in major democracies. Its application would mark a significant defeat for tech companies in their decades-long battle to avoid being wielded as government tools against their users, the people said, speaking under the condition of anonymity to discuss legally and politically sensitive issues.
Rather than break the security promises it made to its users everywhere, Apple is likely to stop offering encrypted storage in the U.K., the people said. Yet that concession would not fulfill the U.K. demand for backdoor access to the service in other countries, including the United States.
(snip)
This was sort of the trigger case from almost 10 years ago -
U.S. Says It Has Unlocked iPhone Without Apple
By Katie Benner and Eric Lichtblau
March 28, 2016
SAN FRANCISCO The Justice Department said on Monday that it had found a way to unlock an iPhone without help from Apple, allowing the agency to withdraw its legal effort to compel the tech company to assist in a mass-shooting investigation.
The decision to drop the case which involved demanding Apples help to open an iPhone used by Syed Rizwan Farook, a gunman in the December shooting in San Bernardino, Calif., that killed 14 people ends a legal standoff between the government and the worlds most valuable public company. The case had become increasingly contentious as Apple refused to help the authorities, inciting a debate about whether privacy or security was more important.
Yet law enforcements ability to now unlock an iPhone through an alternative method raises new uncertainties, including questions about the strength of security in Apple devices. The development also creates potential for new conflicts between the government and Apple about the method used to open the device and whether that technique will be disclosed. Lawyers for Apple have previously said the company would want to know the procedure used to crack open the smartphone, yet the government might classify the method.
(snip)