Then again, I can't fathom what people would be doing with their money if the stock market weren't there. I imagine they might naturally wind up with some sort of...stock market.
As you point out, in practice what's efficient is what can capture the highest return, not necessarily the highest return per se. If say investing in education had high returns society wide but those returns couldn't be captured, that's not an efficient use of private capital.
And if so, why is that necessarily a good thing? Why should that be our goal as society as opposed to things like minimizing child mortality, increasing literacy rates, making sure we don't have a ton of our fellow humans living on the street in misery etc etc - things that make the lives of our fellow humans better? Why is capital growth the metric we have chosen to optimize for? Surely there's better things to optimize for?
Excuse the polemic, but infinite growth with no regard for anything else is the ideology of a cancer cell - and to me that is increasingly what it feels like when we are wasting all these resources on a dying planet just to make numbers go up.
There's a lot that's not captured by solely looking at dollars, like the examples that you bring up, such as quality of life, human welfare, and so on.