I don't think investors actually believe there is zero risk - the phrase "risk-free" is a holdover from the assumptions of theoretical asset pricing models, and now everyone who gets trained in economics or finance is just being sloppy.
It would take more than the USA ceasing to exist for bonds to become worthless - maybe the USA will peacefully disincorporate, but still unwind all its debts. It would take something that would destroy the productive capacity of the USA as a whole, or something that causes massive tax revolts - an asteroid strike, or an alien invasion maybe? If you're an optimist about the economic effects of AI/nanotech etc, then it seems that should make the chance of defaults less likely, not more.
I've always been annoyed by the term "risk-free bonds rate", meaning the return on US Treasury bills. Just because US bonds have not defaulted within their trading experience, people assume this is impossible? A list of major governments in 1900 would probably put the Ottoman Empire or Austria-Hungary well ahead of the relatively young United States. Citing the good track record of the US alone, and not all governments of equal apparent stability at the start of the same time period, is purest survivorship bias.
The United States is a democracy; if enough people vote for representatives who decide not to pay off the bonds, they won't get paid. Do you want to look at recent history, let alone ancient history, and tell me this is impossible? The Internet could enable coordinated populist voting that would sweep new candidates into office, in defiance of prevous political machines. Then the US economy melts under the burden of consumer debt, which causes China to stop buying US bonds and dump its dollar reserves. Then Al Qaeda finally smuggles a nuke into Washington, D.C. Then the next global pandemic hits. And these are just "good stories" - the probability of the US defaulting on its bonds for any reason, is necessarily higher than the probability of it happening for the particular reasons I've just described. I'm not saying these are high probabilities, but they are probabilities. Treasury bills are nowhere near "risk free".
I may be prejudiced here, because I anticipate particular Black Swans (AI, nanotech, biotech) that I see as having a high chance of striking over the lifetime of a 30-year Treasury bond. But even if you don't share those particular assumptions, do you expect the United States to still be around in 300 years? If not, do you know exactly when it will go bust? Then why isn't the risk of losing your capital on a 30-year Treasury bond at least, say, 10%?
Nassim Nicholas Taleb's latest, The Black Swan, is about the impact of unknown unknowns - sudden blowups, processes that seem to behave normally for long periods and then melt down, variables in which most of the movement may occur on a tiny fraction of the moves. Taleb inveighs against the dangers of induction, the ludic fallacy, hindsight, survivorship bias. And then on page 205, Taleb suggests:
Does Taleb know something I don't, or has he forgotten to apply his own principles in the heat of the moment? (That's a serious question, by the way, if Taleb happens to be reading this. I'm not an experienced trader, and Taleb undoubtedly knows more than I do about how to use Black Swan thinking in trading. But we all know how hard it is to remember to apply our finely honed skepticism in the face of handy popular phrases like "risk-free bonds rate".) Regardless, I think that if you advise your readers to invest 90% of their money in "extremely safe" instruments, you should certainly also warn that it had better not all go into the same instrument - no, not even Treasury bills or gold bullion. There is always risk management, and you are always exposed to error. The safest instruments you can find on this planet aren't very safe.