A company cannot legally defy the court in the US.
They can only argue against a specific request it and appeal a ruling or an order.
As for the San Bernadino case it's not correct.
Apple has complied with the court order, they gave the FBI access to the iCloud Account.
What they didn't do is to decrypt the phone but they were also not ordered too by the court.
If the court would have ordered them to develop a way to decrypt the device and they've lost all appeals they would've complied with that too.
They can only argue against a specific request it and appeal a ruling or an order.
As for the San Bernadino case it's not correct.
Apple has complied with the court order, they gave the FBI access to the iCloud Account. What they didn't do is to decrypt the phone but they were also not ordered too by the court.
If the court would have ordered them to develop a way to decrypt the device and they've lost all appeals they would've complied with that too.