"Greed, for lack of a better word, is good." said Gordon Gekko in Wall Street (1987). But saying so is disingenuous. Greed has no motives, no more so than any emotion. Human beings, and likely every living thing, simply want an easier life, and we have no standard to compare to other than how other people live. Greed can lead people to do bad things, or good things, and there lies the rub. It is the people who decide to take actions that lead to positive or negative outcomes.
Capitalism, as we practice it in the US, is a tool. Just as any tool, it has no motivation other than that which its users ascribe it. One of the most amazing things about this tool is that it can focus a natural human trait, greed, into socially positive outcomes. The examples are many, from a private transportation infrastructure that allows global travel within hours, to cleaning products that prevent disease and improve lifespans. Unquestionably these enterprises produces great wealth as a byproduct of providing those goods and services.
Capitalism can focus greed to produce a positive outcome but a positive outcome is not inevitable. That, in my opinion, is why Capitalism requires strong regulation. It is only through strong regulation that positive outcomes are to be expected. The examples of this are many, from the inevitable fraud and manipulation that result from deregulation campaigns, such as the deregulation of the energy industry in California, to the proliferation of pyramid schemes thinly veiled behind the term 'multi-level-marketing'.
The ability to create positive outcomes is the purpose of capitalism, the generation of wealth is the side effect, an amazing side effect in what it provides for human nature, but a side effect non-the-less. It is when we begin to believe that wealth creation is the purpose that we risk slowing or halting the progress we have made thus far, and ultimately could lead to the downfall of our civilization.