Yes, it's perfectly sensible to use the bank's money when it's a fairly sure bet and the interest rate is low... but there is a big complexity cliff that exists between "used 0.1% of the bank's money" and "used 0% of the bank's money". Using 0% of the bank's money is preferable when closing the deal at least.
If you are in a position to make an all-cash offer but you want financing, you could probably buy the property in cash and then get a mortgage after. That's not the usual workflow for homebuyers but I don't see why you couldn't do it, it's just like refinancing really.
I don't know about you but in my generational cohort the people buying entirely on their own earning power is a small minority. The bulk of buyers are only able to enter the market due to generational wealth - and that comes in the form of cash.
So yeah, agreed in principle that if you had $X in cash lying around it'd be a poor choice to put it all on a piece of real estate. But in this case the $X in cash doesn't belong to you.
The whole state of the housing market is beyond alarming - not only are things completely unaffordable to wage earners, the people who are able to survive in this market are overwhelmingly doing so via familial and generational wealth. This is a flywheel of wealth inequality that is accelerating by the day - the well-asseted use their wealth to catapult their offspring into more assets that largely wage-earning classes (even very well-paid wage earners) are completely cut out of.
I've also known people who have enough familial wealth that they just don't care.