Can we justify the price of gold instead by the high cost of mining it? No, the causality runs the other way. The cost of mining gold is driven by its market price, as miners grab the largest share of its selling price that they can.
What about central bank purchases of gold? Central bank reserves also hold gold rather than foreign fiat currencies for gold’s non-confiscatability. A foreign fiat currency can be confiscated via devaluation by its government or central bank, but gold cannot.