“Why does it have monetary value?”
Why does anything have monetary value?
My point exactly. Gold is not magic. It does not have monetary value just because you or I want it to have monetary value.
Gold is a medium of exchange by consent, not by intrinsic worth.
If there is a complete collapse to the extent that many pushing gold are indicating, then gold will become just as useless as paper money. Food, shelter, and labor will be the modes of trade, not anything with “monetary” value.