I really hope that I've got this horribly wrong, but I have to ask...
I have this idea, which I base on comments and explanations I've heard over the years, that when you make a Bitcoin transaction, for example 0.001 BTC, your wallet (let's assume Bitcoin Core) actually sends your entire funds of your wallet, let's say 1.5 BTC, but also includes a "gimme back" signal for 1.5 minus 0.001 BTC, ie 1,499 BTC, in the same "atomic action", meaning you never actually risk losing all that money, but it is advertised to the person receiving it, and maybe the entire world.
I don't understand why it would do this, and it seems extremely bad for privacy, and I'm not at all sure that it's done. Maybe it only happens sometimes? If so, when? Or maybe it doesn't mean "the full funds of the wallet", but something else?
I hope that somebody can clear this up once and for all. It's pretty telling that somebody who knew about Bitcoin in 2009 is actually asking this question in 2021, after using it for highly sensitive tasks for over a decade... I'm not wild about random people knowing how many Bitcoins I have simply by sending them money, and hope that this is not how it works.