Its in the best interest of greedy people to do enough to keep the non-greedy people alive, because the non-greedy either become greedy and contribute in a capitalist way, or end up being happily exploited by the greedy in some way.
But its important to be mindful that there are a lot of fundamentally important aspects of every society that dont fit into the capitalist model, when you think about work, where does parenting fit with that ?
There is a saying, 'the greatest contribution any parent can make to society is to bring up well adjusted children'