I think the title is a bit misleading. Mozilla isn't sending keylogs to the NSA or anything like that. The search queries are being sent to microsoft via google who is a known partner with the NSA. Its no different then google tracking your search queries and building a profile on you(then handing it over to the NSA when they ask for it). Either way the same people are getting the same data, it's just now easier for them since microsoft is more cooperative.
I don't like the deal mozilla has made but really they didn't have much of a choice. Their deal with google expired and google felt no reason to renew it since they have their own browser to work with. If you were about to lose literally 90% of your income you'd sure as hell be looking for a new cash flow. Before you mention donations, remember that thats basically the other 10%.
The whole situation is crummy, but I don't think treating mozilla like they are the bad guys is productive. Remember this wouldn't be anywhere near as much of a problem if microsoft wasn't so chummy with the NSA.