But 15 Federal district court judges have approved the NSA actions as part of the FISA courts. That a single federal district court disagrees isn't a huge deal.
The third party doctrine is very clear. Records about you do not carry a reasonable expectation of privacy. The judge who ruled against the NSA wants to change the law. Maybe the courts will change the law. SCOTUS has disfavored mass surveillance tactics in the recent past.
But right now, it is legal.