I mean they could have tried not complying, and fighting a lawsuit at the ECHR (right of every person to a private life). Takes money and time but more attractive than the other options.
This play by Apple applies pressure to the UK government indirectly via its citizens, for free, rather than taking the risk and expenses of a lawsuit.