While I don't recall any leaks specific to piracy investigations, there were numerous leaks proving NSA involvement in cases which could in no way be described as relating to terrorism.
The US government has interests beyond preventing terrorism. Do you think it should be purposefully blind to facts such as the energy security of other countries, or the capabilities of their space programs? Space programs have a very clear military "dual use" as North Korea has been demonstrating recently.