Mostly because governments use violence to change the relative price of anything. If a government made owning a gold coin or a bitcoin a crime punishable by death, I think its buying power would go down. Similarly, by forcing citizens to pay taxes in a specified currency at the threat of jail time, a new currency is created.
It's made up all the way down.
Generally gold confiscation doesn't mean the purchasing power going down, just transfering it to the governments. It's still quite scary though, as I wouldn't be surprised if it happened again :(
The scariest thing is if all the countries in the world try to ban gold and Bitcoin at the same time to preserve the fiat system.
I'm hopeful that as Schnorr signatures will make coinjoins more practical, it will be easier to use as well, thereby making ownership of Bitcoins less visible to governments. Wasabi wallet is great at doing coinjoins, but when I tried it, it was just too slow.
The problem with banks is that they have a good reason to conflate unit of account with store of value: they make lots of profit on people not understanding the difference.