It's a lot more of 'hedging' than 'investing' in this case. An investment is mostly referred to something whereas you expect profit.
That's why the "", but some do think of those like investments and in some extreme cases you could even make a profit, so not only you're not losing purchasing power but since the whole thing is going down the drain each of your $ is worth more in that crumbling economy, land, houses, almost everything that is tied to the economy in that particular area. But, not the ideal scenario and not the way I want to live my life.
The economic situation triggers the demand, and a meltdown in crappy economies triggers a rush to a safe haven, it's almost the same as in BTC but with a twist, while some try to escape a devaluating currency to USD, with BTC more look for gains now, not protecting their wealth. So, demand that triggers value, vs constant value that triggers demand. Quite the opposite of what one would have expected.