A US judge should be ruling based on US law in a case brought in the US.
This isn't a criminal case. Zuru is suing Glassdoor in California Court because that's where Glassdoor's head office is located. The California court ruling is that since Glassdoor operates in New Zealand it must abide by the laws of New Zealand, and it must turn over the identities of the people involved in accordance with New Zealand law. The California court is not ruling on the merits of the slander case so the free-speech or slander laws in California are immaterial. The California Court is basically saying, "since you operate globally, you must abide by the the laws in the countries you operate in".
If you visit / do business in a foreign country, you have to abide by the laws of that country -- even if they're different than the laws in your home country.