Even the legal commentator on CNN made your point. Evidently the gov't didn't even defend the case on the merits; it just argued that plaintiff's didn't have standing (or some other jurisdictional argument). The commentator was actually fairly amazed that the judge ruled on the merits and was even more amazed that she ordered an immediate halt to the program. Seems like this judge may come out looking like an idiot.
The judge admitted they didn't have standing but she also claims she had no choice but to rule because the government refused to give up national security secrets. She's trying to have it both way, if they didn't have standing the case should have ended regardless what the government was willing to reveal.