These aren't "iPhone owners" in general; they're plaintiffs in an obscure civil claim against Apple involving a very broad antitrust argument about Apple's relationship with AT&T. They're not arguing iPhone users are entitled to source code, but rather attempting to do some kind of legal discovery.
They appear unlikely to succeed: judges have lots of latitude to protect trade secrets during discovery, and Apple certainly has these people outgunned 100-1 on the legal front. In the incredibly unlikely scenario in which the plaintiffs do get some redacted access to source code, it won't matter to us, because they'll never be able to talk about it ever again.
I'm surprised Apple agreed to show the source code in the first place. If I'm not mistaken the software on the iPhone is licensed and not sold, so end-users would have no right to the source code, right???
From what I read, Apple isn't agreeing to, they may be compelled to by the judge. You are correct, apple isn't selling users the software on the devices, they are licensing it, and the terms of that license likely stipulates that users have no right to the code (I don't know for sure, because I've never read the license, even as I type this from my iPhone).
In this case the license isn't the issue. The court isn't bound by the license, and if it deems it necessary for evidentiary purposes, over and above any objections Apple raises, then it will order Apple to turn over the code.
If you Google "trade secrets discovery", you'll find that courts appear to tend to defer to trade secret holders, and that there are numerous alternatives available to the court besides revealing trade secrets to satisfy discovery claims.
I am guessing that these guys:
http://www.hoffmanandlazear.com/
who represent the plaintiffs, who are asking for "not less than 600 million dollars" for having their hacked iPhones bricked, are going to lose to Apple's lawyers in High Comedic Fashion.
They appear unlikely to succeed: judges have lots of latitude to protect trade secrets during discovery, and Apple certainly has these people outgunned 100-1 on the legal front. In the incredibly unlikely scenario in which the plaintiffs do get some redacted access to source code, it won't matter to us, because they'll never be able to talk about it ever again.