If in a hypothetical alternate universe the US had a civil war tomorrow, it could have a massive budget surplus and yet it'd probably find that nobody would be willing to lend to it regardless, because the climate of repayment would be so uncertain.
In today's real world, the US has the power to print its own money. In very real terms it can define the very term "debt" as whatever it pleases. That, combined with its status as a massive buyer of foreign goods, history of entrepreneurship and growth, history of corrective action by the Fed, insanely powerful military, and so on, means that it could owe 100x times as much as it does today, and nations would probably still happily lend.
A nation is not a household. It doesn't reach some magic number "lending ceiling" where everyone else says, "you owe 100 trillion and 1 dollars, we're not gonna lend any more" like might happen to a regular person with a credit card. A "AAA" rating is just some label that some private company makes up.
So the issue isn't some dollar amount drawn out of an economist's hat, but rather the real trust inferred from a nation's geopolitical position.
Any real students of economics please do correct me, as I have no doubt my reasoning is flawed somewhere. But this is how I currently understand it.
And yes, America is currently the most powerful economy in the world's history, and that's why it has an AAA credit rating despite its fairly disastrous finances. But barring total implosion, China'll be the top dog within a decade or so, and what happens then?