Sovereign countries interact in the state of nature. Your country has a problem with the NSA? Pick up a SAT solver and build yourself some ROP shellcode and hit us back. Oh wait: your country's already doing that.
Do I like it? No. We don't work with the USG, and that's one of many reasons why.
My country? Are you kidding, they couldn't hack their way out of a paper bag. Any expertise and equipment they have is provided by the NSA, and they're a bunch of B-players with no budget.
The whole situation is uncomfortably asymmetric. Economies of scale I guess. Winner takes it all.
From whom? Last I checked we had most of our fleet sitting outside countries with whom we have conflicts of interest and not countries known for harboring pirates taking over private vessels. When was the last time a US war ship captured a Somali pirate vessel?
The US Navy capture smaller vessels quite regularly. The larger pirate boats may have non-combatants and/or hostages aboard so the rules-of-engagement limit the Navy actions.