I don't think Terry is applicable. Terry has to do with stopping a person based on some suspicion that that person might be committing a crime. You're quite right to point out that the suspicion required is minimal, and that it's easy to manipulate. However, the type of search that can be conducted through a Terry stop is limited to fairly strict justifications--the officers can really only conduct searches to protect themselves (i.e. to see if you have a weapon) or evidence (to prevent you from destroying it).
But what's going on here is massive, indiscriminate collection of information on people whom the government has no reason whatsoever to suspect of any crime. Not only that, the officer safety and evidence preservation justifications don't apply either. NSA surveillance isn't really comparable to conducting a Terry stop on the entire nation.
You're absolutely right that there are reasons to believe this might not stand up on appeal. However, the reasoning from Smith is hugely problematic with the advent of the cloud. Smith is based on what's called third-party doctrine: basically that the Fourth Amendment applies to your stuff that's in your possession. If you give your stuff to someone else, they don't have a Fourth Amendment right to it, and the government can take it without a warrant. Before the digital age, it was unusual to entrust sensitive private information to third parties. Most of what we had was kept on paper. Now, people put huge amounts of information in the hands of third parties, often without really realizing it. Extending third-party doctrine to all digital information would decimate online privacy.
This is where the future of Fourth Amendment jurisprudence is headed, and how the courts decide will have huge ramifications for the future of privacy. So again, you're right that there's significant precedent that must be overcome, but it's by no means a done deal. Even some of the conservative Justices in the recent Fourth Amendment cases seem pretty concerned.
EDIT: I looked at the opinion a little more closely, though I still haven't read it in its entirety. The judge's order only "(1) bars the Government from collecting, as part of the NSA’s Bulk Telephony Metadata Program, any telephony metadata associated with their personal Verizon accounts and (2) requires the Government to destroy any such metadata in its possession that was collected through the bulk collection program."
So by its terms, the judge's order only applies to these plaintiffs. However, if the opinion is upheld on appeal (see below), it seems unlikely that the NSA would continue the bulk program against anyone without individualized suspicion. If the opinion is upheld it would indeed be very easy for anyone else to sue and get a similar order.
EDIT 2: Footnote 69 of the opinion confirms that it applies only to two plaintiffs, Larry Klayman and Charles Strange. Other plaintiffs did NOT get relief, apparently because they didn't prove they were telephone subscribers.
--------------------------------
ORIGINAL COMMENT
I have a law degree from Stanford, but I have not read the opinion in its entirety, so this is quite possibly premature. The judge ruled that the program is unconstitutional. Typically, the remedy for such a ruling would be for the judge to enjoin the program. That would prohibit the NSA from continuing surveillance against everyone, not just the two plaintiffs.
However, the judge stayed his own ruling, meaning that he will not issue an injunction at this time. He did that to let the government appeal, which it will undoubtedly do. In other words, the ruling will not take effect unless and until it is upheld on appeal. The case was decided in the District of DC, so it will go to the DC Circuit, and (potentially) the Supreme Court. So it could be a long time before it has any effect at all.
Regarding Zikes's comment, unfortunately a district court court opinion has little precedential value. It is not binding on other federal district courts, even within the district where it was decided. It may be persuasive, and it can certainly be cited, but it has no power to bind other federal courts. If it is upheld by the DC Circuit, it will carry a lot more weight.
Actually, I think this is a really great example, and how you view it says a lot about your philosophy. Let's call the libertarian astronaut Ayn. Ayn is rational, and she happens to really like breathing normally. There's no biological reason requiring her to do so, but breathing more slowly seems inconvenient to her. So she just keeps breathing normally. Since she assumes the other three astronauts to be rational, she expects them to moderate their breathing even further to account for her normal breathing.
At first, this is what happens. The other three astronauts breathe even more slowly to make up for Ayn's normal breathing, keeping them on pace for 8 hours of oxygen. But the other astronauts think this division isn't fair--there's no reason that Ayn should get more oxygen than the rest of them. They decide that they have a couple of options. First, they could all start breathing normally in the hopes that Ayn would start moderating her breathing in response. It would turn the spaceship into a contest of who blinks first, and if no one blinked soon enough, all of them would die. Second, they could kill Ayn, but they believe murder is immoral. They think Ayn's behavior is unfair, but killing is worse, so they don't do it.
Instead, the other three astronauts come up with another option. They vote on and accept the moderated breathing policy for everyone in the spaceship. Ayn refuses to participate in the vote. The other three astronauts unanimously elect one of them--we'll call him Big Brother--to regulate the use of oxygen. Big Brother keeps track of everyone's breathing and can slap people in the face if they don't breathe at the agreed-upon rate. The rules allow any three of the astronauts to vote out the oxygen regulator if he doesn't do a good job, or doesn't comply with the breathing regulations himself. Ayn might not like breathing slowly, but she likes getting slapped in the face less, so she moderates her breathing.
But now Ayn is upset. She argues forcefully that she's a bold risk-taker and that society should incentivize her risk-taking. She took a risk and breathed normally, taking what she wanted even though it created a possibility that the other astronauts would do so as well, which would kill them all. She points out that Big Brother has made some mistakes--he's miscalculated the breathing rate a couple of times and slapped people when they didn't deserve it. She argues for the deregulation of oxygen and the return of the free market. Who's right: Ayn or Big Brother? Neither is perfect, but I'll take Big Brother. The alternative is a game of chicken where the stakes are everyone's lives.
As for this example being contrived, let's change it slightly. Let's say 7 billion people are born onto a planet. This planet has limited drinkable water, breathable air, arable land, and combustible material. We can either let people use those resources however they please, risking the resources' eventual pollution, overuse, and depletion, or we can establish systems to regulate use so that they will be available to everyone for for the foreseeable future. If we don't regulate their use, we can get iPods at slightly cheaper prices, at least in the short term. The point is that people will take what they want and cut corners to make money, even if endangers the health of the human race. Yes, we're all in it together. Personally, I'll take the sustainability of the planet over cheaper iPods.
This doesn't mean that I think the government should regulate everything, that all regulation is good, or that our current system of regulation is optimal. But I think it's inarguable that some things need to be regulated, and that there is a role for government. Can government be inefficient, corrupt, or just plain wrong? Sure. It's fallible, just like any human creation (including private entities). But we need it.
I think the antibiotic example is quite telling. Let's press it a little further. As you correctly point out, killing in self-defense is considered legitimate by most (but certainly not all) people. If someone pulls out a gun and starts shooting at me, most people would agree that it is morally acceptable to pull out a gun and shoot my attacker. But the legitimacy of that self-defense is limited by the principle of proportionality. If instead I pull out an AK-47 and rake back and forth with indiscriminate automatic fire, killing not only my attacker but also 15 innocent bystanders, pretty much everyone would agree that I acted immorally. The death of my attacker would be in self-defense, but I'd still be on the hook for 15 murders.
That second example is more akin to taking antibiotics. If we accept that killing microbes is wrong, and accept your argument that using antibiotics is moral because it's legitimate self-defense, we have a problem. Antibiotics kill a lot more than just the invading bacteria. So does radiation and chemotherapy. In fact, they kill a lot of microbes who live in a symbiotic relationship with me and live in my body because they help me break down food or fight infections.
The point is, things are a lot more complicated than simply saying that all forms of killing are immoral. At some point we have to accept that there is an ordering of life forms, and killing some of them to save ourselves is acceptable. If we don't, using antibiotics, chemotherapy, radiation, or other similar forms of care crucial to modern medicine is immoral. Once we accept that not all killing is wrong, it becomes an issue of line-drawing.
But what's going on here is massive, indiscriminate collection of information on people whom the government has no reason whatsoever to suspect of any crime. Not only that, the officer safety and evidence preservation justifications don't apply either. NSA surveillance isn't really comparable to conducting a Terry stop on the entire nation.