The Mexican government takes the profits from Pemex to run the government and social programs.
As a result Pemex can't do much without loans.
Notice that the loans aren't coming from the exceptionally wealthy Mexican ruling class. They have their money invested in safe projects in safe countries.
Their main field is collapsing, and the smaller fields aren't going to be able to make up the difference, at least not any time soon.
We import, or used to, something like a million barrels a day. That won't continue indefinitely, as their fields die and their country demands more oil.
The Mexican government takes the profits from Pemex to run the government and social programs.
And Pemex bigwigs take, ahem, "cuts" to run their very own programs of personal wealth enhancement. No telling how much of this is going straight into someone's pockets.
They have their money invested in safe projects in safe countries.
Like investments such as real estate on this side of the border (think Kingswood, Texas), though they probably aren't shuffling luggage full of US cash across the border with merry abandon like they used to - such a method is too overt and risky these days and has been for a while. Unless of course it's via "diplomatic vouchers" - ever notice how many Mexican "diplomats" there are running around over here for such a "friendly" neighboring country? I don't think I could locate a Canadian diplomat if I looked. You can get your ill gotten gains "vouchered" by Mexican diplomats - for a piece of the action fee of course.