Sources in touch with the New York Times purport that Yahoo was one of the companies with enough brass to try to resist national security data requests before its indoctrination into PRISM. In a secretive court though, the company was given the choice to either cooperate with federal agencies or submit to breaking the law. Yahoo, along with several other companies, chose the former.
If you've managed to somehow miss it, PRISM is an NSA-led effort to indiscriminately vacuum up all electronic communications into a central, searchable database. From there, authorized agents are able to sift through enormous sets of data, using methods like software-based heuristics to gather information which the agency argues is vital to foiling future terrorist plots. Details of PRISM's existence were exposed by Edward Snowden, an ex-government contractor who is now on the run for publishing classified documents.
Yahoo argued that handing over its users' data to the government without a warrant would violate constitutional principles. The secretive FISA court strongly disagreed.
"The record supports the government. Notwithstanding the parade of horribles trotted out by the petitioner, it has presented no evidence of any actual harm, any egregious risk of error, or any broad potential for abuse." the court stated. “Efforts to protect national security should not be frustrated by the courts."
"The petitioner suggests that, by placing discretion entirely in the hands of the Executive Branch without prior judicial involvement, the procedures cede to that Branch overly broad power that invites abuse." the court continued. "But this is little more than a lament about the risk that government officials will not operate in good faith. That sort of risk exists even when a warrant is required."
FISC, the Foreign Intelligence and Surveillance Court is the product of FISA, the Foreign Intelligence Surveillance Act. The bill, amongst other things, grants feds the freedom to spy on foreigners and "their agents" without the need for a traditional warrant. Instead, the FISA court has its own process by which it issues warrants -- a process which is reportedly entirely non-transparent and less rigorous. Worst yet, the FISC has been accused of being a "rubber stamp" for federal authorities.
According to the New York Times, tech companies rarely issue legal challenges to combat national security requests; however, they do attempt to fight back by negotiating with officials. Yahoo, Google and Twitter are just three tech companies which have shown some resistance to government surveillance.