Not sure exactly what you're asking. If the question is, "how often does the government stop doing something when threatened with a lawsuit to avoid a determination in court of the government practice's legality" the answer is, all the time. Does that mean that people willing and able to legally challenge the government are more likely to get the government to stop doing whatever it is the government is doing to them? Absolutely. Is that cynical and unseemly? Yes, but it's a reality of USA's legal structure. Congress passes laws, but the courts decide whether those laws are valid, and how those laws apply to specific factual situations. That means there's always a measure of uncertainty about a law's validity. To put it another way, Schroedinger's Law only becomes constitutional or unconstitutional when the courts "see" it.
When Lawrence v. Texas came up to the SC, gay rights activists were despondent, because they thought there was no way they were going to win. Well, they did win, and their win meant that laws banning same-sex sodomy would be declared unconstitutional. A loss would have meant that states would know for certain that sodomy laws that discriminated against homosexuals were constitutional, and might even prompt more states to put anti-gay sodomy laws on the books. (Lawrence invalidated all sodomy laws, by the way. If sex is between consenting adults, not incestuous, and in a private place, it's legal.)
The timing and the factual circumstances of how a law is challenged in court can be a tremendous influence to how the Supreme Court decides a case. The Government and activist groups both want to create binding precedent favorable to them, so if they think they're going to win, they take a case to the Supreme Court, and they do whatever they can to prevent a case they think is going to lose from getting to the Supreme Court. If the group the government had been spying on had turned out to have solid terrorist connections, you bet your ass the government would take it to the high court. Now theoretically it shouldn't matter to the validity of a law that the group was caught doing something bad or not. That's like saying that breaking into someone's house is constitutional in every case where you find illegal guns or drugs. But does the demonstration of a laws effectiveness or ineffectiveness make a difference to judges? Sure does. Take Clinton v. Jones. In that case the Supreme Court unanimously decided that sitting Presidents had no immunity to civil litigation for acts committed prior to taking office. The justices figured it would be "highly unlikely to occupy any substantial amount of [the President]'s time" to defend himself in court during his term. Clinton's testimony in that trial led directly to the Lewinsky scandal. The next time this issue comes up, it's a safe bet those justices vote the other way.
One other thing I think needs to be pointed out: cases are settled for reasons other than the merits of a claim all the time. If a plaintiff suing for negligence is an adorable 10-year-old girl, she's much more likely to win than a 30-year-old construction worker, even if they suffered the exact same harm. So if both claims were settled before going to court, the 10-year-old would get a larger cash settlement.
EDIT: I should add that most of the time when the issue of avoiding litigation comes up, it's in a pedestrian context. The government, for example, may have decided that the terms of their contract mean X when the better reading is that they mean Y. X makes things more simple administratively, so they go with X and avoid litigation about it. (For example: when an employee is relocated to a new building but keeps his old job title and responsibilities, has he been "transferred" according to the terms of his contract? This is important if, say, an employee may contest a "transfer" but may not contest run-of-the-mill managerial decisions.)
I should also add that the government's motivation for stopping doing something when threatened with a lawsuit is often about money, not about fear that the law is unconstitutional. If the government has a case it's almost sure to win, but bringing it to trial would cost millions of dollars in attorney's fees and discovery costs, it may settle the case (or as in your article make the case moot) just to save money. That may have even been the case in your article, though I doubt it.