In a way with things like NSL's and Secret warrants and courts the US had backed companies like Apple and Google into a wall. Post Snowden everyone knows that the Government can get information about you from them without your knowledge and you will have no recourse. It's a PR battle those companies can't win. So they did an end run. Go ahead and get your secret warrants and send those NSL's it's physically impossible for us to get you the information you want.
It forced this whole thing out into open. I can't help but think this sort of legal battle is both expected and in some cases desired by the likes of Apple and Google. They finally get to fight these battles out in the open and any loss of privacy can be blamed on the government rather than the company. It's a kind of PR win whether they win the court case or not.
Of course there is still the problem of not looking pro-terrorist in the process which is another risk to factor in. But at least it's a public debate rather than a private one now.