Money is a medium of exchange that allows a society to be more efficient. If Society is viewed as an organism that seeks to minimise the wastage of effort, money is the perfect mechanism for achieving that aim. If we were to assume that an endeavour that gave greater profit was more useful to society than one that did not, simply because more utility was delivered per joule of energy expended, then investment by individuals, motivated only by greed, is the mechanism that is most liable to deliver the greatest utility to society as a whole.
If on the other hand the benefit of that reduced effort was never spread to society as a whole, then investment by individuals motivated by greed is a great social tragedy.
The only society that can work efficiently is one in which resources are moved to where they are most useful in the least possible time, and the benefits of people’s work was felt in all of society.