Greed is a basic human nature, and as civilised people it's up to us to overcome that and work for the good of all people, not just ourselves. However, not everyone can overcome it. When this happens among members of the general populace we have crime, but when it happens among powerful government members, we have corruption.
A capitalist system works because individualism and owning things have been important to people for a long time now, and money, which provides both security, entertainment and neat things to own, also provides an incentive to contribute to society in the form of work.
Thus, when devising a system of government, three things must be kept in mind. One, the government must exist only to benefit the people. Two, people are, by their nature, selfish, and exist to further their own ends above all else. Three, people's nature is to join together with others of their kind, whether that means people of their race, their clan, people of similar interests, or merely their neighbours, for mutual support.