There are a few reasons:
1) Say I'm a Danish pension fund looking to park my money somewhere super safe. I can buy US government bonds that pay 1-2.5% (depending on length to maturity) and indeed many foreign investors will do this. But I still have some risk there, because what happens if the value of the dollar goes down against the Euro and now I lose 5% instead of making 2%? So I look for something denominated in Euros. I can invest in corporate debt, but that isn't as safe. And for the largest, safest companies, that debt might pay zero or even negative anyway, since it just needs to pay a bit higher than Danish government debt to attract investors. I can buy Euro denominated Greek bonds, but again, not as safe. If I want a super safe investment, I want Euro denominated government debt from a stable government known for paying its debts. And if those governments pay negative interest, I'm stuck and I have to do it anyway, because pension funds aren't allow to take many risks.
2) The same thing with currency fluctuation holds on the other end. If I'm an American, I can buy US Government debt. And most will. But if I think that the Euro is going to rise against the dollar, I can bet on that Danish debt and if the dollar goes down 5% against the Euro, I come out a winner. And I still get the guarantee of the stable Danish government that the debt will be paid in full (in Euros).
Of course, you might wonder, why not store the money under your mattress? You'll come out ahead that way! Of course you will, unless something happens to that money. Imagine you have a million dollars in cash. Would you store that under your bed? Of course not! You'd get a safe. But you need a really good safe for $1 million, so that's gonna set you back 10k, and you still won't sleep well at night. So to sleep better you put your money in a bank. But the bank can't take your money and loan it out profitably, because mortgages are at zero. So they tell you, fine, we'll take your money but we're gonna charge you for the service of keeping it safe. It'll be 1% a year and now you can sleep better at night.
Now, if you are a pension fund with $10,000,000,000 in assets, you can't just go to a local bank. So instead, you invest in government debt, which is really just the government keeping your money safe for you for a fee.