I see your point, but if it cost more to produce than the market price then nobody would mine gold. What separates gold from most other things is its durability not it's rarity. Gold from mined hundreds of years ago is just as valuable as fresh gold so the amount of new gold entering the market each year has little impact on its supply.