The court order was granted under terms of the Electronic Communications Privacy Act of 1986 which, because it was written before the advent of the web or location services on cell phones, doesn't protect those things well.
The test protecting your privacy is open-book, web-search-allowed for law enforcers
It includes two levels of access for law enforcement agencies. The lower one – which only requires that agencies show "reasonable grounds" information like a list of people you've phoned using your old AT&T POTS line, but not tap the phone and listen to conversations, which would require "probably cause" to believe you'd committed a crime and a different kind of warrant.
No one is accusing Jacob Applebaum of committing a crime, but the FBI was able to get a list of everyone he had traded mail with for two years.
Sonic.net and Google both fought for the right to inform Applebaum his contact list was being fingered, but a judge said no. Sonic.net fought to keep from turning the information over on and because thge ECPA violates the fourth amendment rules that forbid police from frisking you every time you walk by and they suspect you of something.
(Several courts have already ruled ECPA does violate the 4th Amendment, but no test case has been taken up at a high enough level to decide it for sure. There are several groups fighting to get the law updated or force the Supreme Court to make a decisive ruling on the law. So far they haven't made much progress. )
Requests for information under ECPA are almost always confidential, and the ISP or email provider are both ordered not to say anything; so the whole thing takes place in secret, the way all honest, upright, Constitutionally valid investigative procedures are conducted.
First they came for the Twitterers, but I was not a Twitterer, so I said nothing.
The DoJ wanted to know who Applebaum was writing to after the non-profit Committee to Protect Journalists accidentally printed his name in a post that also revealed he was working on a volunteer basis for WikiLeaks.
On Dec. 14, 2010, the DoJ got a court order for Twitter to turn over a list of all the IP addresses of a list of people who had talked with Applebaum on Twitter, or with two other WikiLeaks' advocates – one a member of the Icelandic Parliament and the other a Dutch programmer. The order also demanded email addresses from their correspondents.