Mineral rights licenses, taxes etc. Same story with our now dead steel industry but we still make money from the iron ore. We're never getting that back btw, China's refining tech is 20 years ahead of everyone now.
It's funny that most people outside (and probably inside) Australia don't understand that the Lucky Country was meant to be an insult