Markets are at the heart of capitalism, and the price at which a good or service is sold will be one which benefits both buyer and seller.
As the recent financial crisis has shown, there are plenty of ways to profit from capitalism without any benefit (quite the contrary, in fact) to anyone else at all.
In capitalist societies excess population leads to sweatshops. As population growth is checked - as in the developed world - the sweatshops can be legislated against and got rid of. The problem is not capitalism but population growth. Simply take away the sweatshops and people would have no source of income and starve.
When has population growth been checked in the U.S.? Our population has been growing at an ever-increasing pace, without significant abatement, since at least the 18th century. Legislation against sweatshops had nothing to do with any supposed change in those numbers.
Whatever the size of the population, capitalism does what it can to exploit it. When efforts are made to legislate against sweatshops, capitalists fight these advances tooth and nail (look at the battles over the formation of unions) until they are forced to give in. Then wages go up and living conditions improve. But eventually, the most enterprising capitalists look to outsource their jobs to other countries where labor can once again be had under sweatshop conditions. Other business owners, acting out of their own best capitalist interests, follow suit.
Greed is condemned by the Christian moral code, not capitalism.
For many centuries, it was held that usury--lending money at interest--was against Christian principles, and was therefore outlawed (which is why Christians had to do their borrowing from Jews). Nowadays, lending money at interest is pretty much the basis of the world economy. Judgments about what economic practices Christianity does or does not condemn are notoriously subject to change over time.
Capitalism is just a tool. Greedy people will do evil with it. Generous people will do good with it.
Greedy people will be successful with it. Generous people may also succeed, provided they don't carry their generosity too far--and so long as that generosity is always carried out with the bottom line in mind (tax write-offs, positive PR, etc.).