Capitalism has its problems, for sure, but it is the only system in history that has raised the majority of people out of abject poverty. Even Marx recognized this, which is why capitalism is a necessary step on the path to Marx's communism.
And of course Marx was seeing capitalism before it had done the majority of the good it has done over the past ~200 years.