No, you are wrong about what Apple told the judge.
Apple actually told the judge that they could not unlock or decipher the more than 90% of iOS devices that are currently using iOS 8 and iOS 9, but they can unlock the less than 10% of iOS devices that are still using iOS 7 or lower. That is not the same as saying "of course they can unlock all iOS devices," as you claim.
They did say that they would not unlock the older devices (which this case did involve) because that would make a differentiation between Apple customers who had opted not to upgrade to the newer iOS. It would also set a bad precedent that the government could require a third party to expend time and money to serve the government's interests, when the government had not shown there was anything on the device of probative value, and they were merely wanting to go on a fishing expedition.
New iPhone is hacked: Anonymous researchers win $1 million challenge to crack the security of Apple’s latest iOS
http://www.dailymail.co.uk/sciencetech/article-3301691/New-iPhone-hacked-Unknown-researcher-awarded-1m-jail-breaking-latest-iOS.html
Apple was smart to put in a hands off decryption that they cannot break. Its a free market and there is a demand for this. The Feds wanting the ability to decrypt any device or system here is another matter that right now I do not agree with.
Actually the NSA has some supercomputers that I believe can break any decryption. Its just that it takes time and hogs the computer and they want it to be easier.
An interesting case would be a top level criminal or terrorist who uses all non-decryptable Apple devices to communicate with his underlings. Would and could the Federales try to bully, shame, legislate against Apple into dropping their decryption policies?