Capitalism cannot function without people exploiting the system for personal gain. If some CEO decided to stop trying to make as much money as possible but rather commit their resources to providing some sort of public good, they would be succinctly ousted by the board. Or their firm would tank, because companies that don't put profit first can't survive on the market.
Jeff Bezos can amass $100 billion in wealth and donate it to philanthropic causes, but if he decided to open source AWS or pay his workers a living wage, or pay publishers a reasonable price for books, etc, he wouldn't have $100 billion in the first place.