Policy-wise, nothing really gets done in the US without the implicit consent of corporate power. This applies even to things like spying. The government is run by the wealthy elite and therefore the policies are designed to favor their interests. Where those interests may conflict, it is usually the entity with the greater influence or better connections that gets their way.
This latter point is where we stand with regard to warrantless domestic surveillance of US citizens by the NSA. The eight companies that have "allied" against this practice, albeit influential as a group, have been for the most part self-interested competitors, and many of them make no attempt to hide the fact that they run a business model that is predicated upon mining personal data from its users in order to sell advertising (Google and Facebook being the most notable examples).
However, that is not to say that they actively or "happily" collaborated with the NSA. The legal requirements, as far as we have been apprised of them, force their cooperation. It is not logical to assume that just because their business involves exploiting their users, that they would not object to NSA surveillance, because the latter does have a deleterious effect on the former. If users suddenly feel paranoid because they think these companies are (willingly or unwillingly) handing over their personal information to the government, then they would be more reluctant to share that data by posting it online. The fear of surveillance brings about increased awareness of the need for protecting one's privacy, which of course is NOT what these companies want. That is the essential argument behind their opposition.
In any case, these companies are merely the repositories for end-user information. The real culprits here, the ones who ARE happily handing over information to the government, are the telecommunications companies, notably AT&T. They are the ones who let the NSA install listening devices on their networks. And you will note that these companies have NOT banded together to protest this illegal surveillance program. They don't see any need to, because they have too much power (since the entire internet is reliant on them) and, unlike Google and Facebook, they have no incentive to protect the data that flows through their networks. If a subscriber doesn't want to share personal information about themselves to a social network, they can opt out of doing so, and the result is a loss of valuable data for the company that operates that network. But it is MUCH harder to completely forgo the internet entirely, which is what you would have to do in order to avoid having AT&T send your data to the NSA. And AT&T doesn't make their money off selling your personal information to advertisers. They make it off your basic need for connectivity.