A couple reasons. It has value because other people think it does and have thought so forever. It doesn’t deteriorate which is one reason people have valued it forever. And it’s pretty.
The last thing sounds like a joke but it’s not. Gold has “use value” meaning you can still do something with it even if you’re not using it as money. Something you can do is make pretty jewelry until you want to spend it. So gold is more valuable than tin foil because it’s prettier than tin foil, deteriorates less than tin foil, and people know and expect that about it.
Latest Answers