I believe there’s some tax advantage for them. Possibly they can claim a tax deduction of some kind on the debt interest. And of course this way not only do they get that but they avoid paying any taxes on the profits they’ve funneled overseas.
(I am not an accountant so fully prepared to be told I am well wrong.)