People choose to hold non-yield-bearing assets when they believe the returns offered by current investment opportunities are not sufficient to justify the risks.
It is the miracle of modern capital markets that enables almost anyone to quickly and easily invest their savings in productive assets, but of course capital markets aren’t perfect. The availability of “none of the above” options (like gold) that remove savings from the pool of active investment capital is the essential feedback loop that balances risk and return.
Modern capital markets also have non-yield-bearing assets like gold ETFs. The only practical difference is a tiny expense ratio and more liquidity.