The mine owners spent time and money researching where to buy mineral rights. They then took out loans to startup the mine. They put up their own home and other possessions as collateral, risking losing everything if the mine didn’t produce.
They worked day and night, living off loans and paying employees with loaned money, while employees got paid and only worked 8 hour days. They did this for months or years before the mine started to produce any gold. Even after it produced gold, it took years before enough gold was extracted to pay off their debts. Only then, did the mine owner finally reap the rewards of their vision and risks.
That’s why the gold belongs to them.