> If the stock market went to zero, they would default on the loan, and money would be destroyed.
> In your loan example, either you haven't spent the money they loaned you, which would then be reclaimed, or you have spent it, in which case someone else has it.
Not sure if you understood the parent's statement. Money is created largely by loans - when banks lend $1m to a company, the company owes $1m to the bank and gets $1m, but no one loses $1m anywhere. And by spending that $1m somewhere else, a fresh $1m is printed out of thin air and goes into circulation. When the company pays that back, that $1m is destroyed.
There is certainly a "root" of money that seems not to be created via loans anywhere, namely those issued directly by the central bank (the Federal Reserve in US's case). And no, they are loans nevertheless - since these money is backed by the government's ability to collect taxes, any money printed is effectively created via loans to the government, and the government has infinite ability to borrow money. When the government is unable to collect taxes anymore, nobody needs these money either and the government effectively goes bankrupt since its loan is no longer backed. As a result, dollar loses its value. That's how our current fiat money system works.