It's been known for a long time that Google has been secretly working with NSA. You may ask why they do it?
1) It is beneficial to NSA.
NSA gets immersive amount of data from Google that they would not otherwise have. Remember that Google logs every and all search requests made, has Google Analytics scripts on basically every site on the internet, owns YouTube (good place to check what videos interest people), and is now trying to compete with Facebook by building the worlds largest social network (with a strict real names only -policy), Google+.
2) It is beneficial to Google.
In turn, Google has strong government backing for all their privacy violations, snooping and ignorance of other countries laws. They have and are building a strong relationship with the highest people on US government so that they get free pass on everything and no liability.
3) Google has got lots of shit lately.
It aligns with the previous point, but Google has been major target of (valid) lawsuits around the world and U.S. lately. FTC is watching them, KFTC is watching them, European Union is watching them. By strongering their position with someone like NSA they are trying to weasel out of these suits.
4) Google is a marketing company
Imagine if you could build yourself as "the marketing company of the internet". You need to gather lots of data for that. By making some favors towards NSA, their upper personal will of course make some back. After all, they are in the same business - snooping people's data. NSA for their purposes, Google for marketing purposes.