Crappy link but it tells you the basics: https://www.zeni.ai/blog/debt-financing-for-startups
The 13 billion in loans are secured not complete junk.
Of course if cash flows become too low to service the debt (I.e. default), musk can always inject[1] more capital and keep the debt serviced he can afford to do that by leveraging (or selling)TSLA and SpaceX stock easily or use other financing options
(1) he could also buy the debt directly himself without changing capital structure, or refinance it by lending the company money personally
or have one of his other companies lend Twitter money,
he did this between spaceX and Tesla once , it is more difficult with TSLA today- he will get sued . However he controls the board and has the power. He did force TSLA by solarCity and won the lawsuit as well so not implausible.