These resources are mined, extracted, refined - for just one purpose, to be sold -- but this is a very small part of the story - the real story is composed of all the steps, obstacles than any producers will have to negotiate in order to extract the resource and bring it to market -- there are any number of rent collectors in the way, claims on the land, outright terrorism to get the producer to either pay more to a rent collector or his his men or both, the payment of rent to the officials of the state for infrastructure, for timely decisions, for efficient and fair adjudication, for not creating legislative obstacles, labor obstacles, for not holding up machinery and parts
See, it's not just "corrupt leaders", it is the system of rent collecting - to confuse people, some say the state should take over, after all, is the state in the business of being in the mining business? but the real reason for such suggestions is two fold, first to pressure the private producer to "pay up" and more importantly, to place government bureaucrats with political connections in the position to promise ot produce at below the cost of production - this is the most important motivation for corruption, after all, the cost of production will then be borne by the state and generate losses, which will then have to be recouped through more state expenditure.