It seems to me that in both cases that even if the FBI had the legal authority to do so, it would have to pay for the technology to be developed and also pay for the damage to the company's commercial reputation incumbent upon defeating its own technology, i.e., several billion dollars in Apple's case.
Put Cook in jail and we will see how long it takes to drill. You are siding with criminals, why?