Markets will make you climb a hill ignoring it ends on a cliff end
Not only are many individual agents aligned with short term interests they often either can't because they will be pushed out by short term thinkers or literally benefit from net harm to all. America mostly being composed of the rich not the masses voting with their wallets.
The problem is it's an optimizing function for the rich getting richer, not for the good of society, not for reducing human suffering, not even, y'know, the survival of the human race.