> they could, by eg signing a malicious OS update

They successfully argued in court that being forced to insert code the government wanted would be equivalent to compelled speech, in violation of the first amendment.

As the Feds often do, they dropped the case instead of allowing it to set a precedent they didn't want.

> They successfully argued in court that being forced to insert code the government wanted would be equivalent to compelled speech

This isn't true, they never "successfully argued in court". There was never any judgement, and no precedent. They resisted a court order briefly before the FBI withdrew the request after finding another way into the device.

There wasn't judgement because the Feds dropped a case that would set a precedent they wanted to avoid.

Since there is longstanding legal precedent that corporations are people and code is speech, forcing a corporation to insert code that the US government demands is a violation of the first amendment.