When I graduated with my degree in electronics, I found the software industry paid much more than the electronics industry, so I entered the software industry.
If the electronics industry wants to hire me, they would have to pay higher salaries. So the salaries in one industry (software) can drive up salaries in another (electronics)
Admittedly, nobody's leaving programming to become a miner - but plenty of jobs pay less than mining, so it could explain a pay gap in some parts of the salary range. Especially in countries like Australia with big resource extraction industries.