Markets are a type of ecosystem
An ecosystem that is complex, adaptive, and subject ot the same evolutionary forces as nature.
As in nature, evolution makes markets an unparalleled way of effectively solving human problems. But evolution is purpose-agnostic. If the market is oriented toward producing junk and calling it good GDP, market evolution will produce ever more junk. As complex adaptive systems, markets are not like machines at all but like gardens.