In this case, they asked New Zealand. Agreement exist among nations to investigate and prosecute criminals abroad too - you just need to abide to them. And there are also worldwide agreement about what criminal acts are.
The issue here is FBI chose to ignore existing agreements and asked a US company to override local laws, to avoid asking through existing agreements - probably because they would go under a foreign court vetting - just like it's happening in New Zealand.
Two very different situations.