Different systems can be better optimized on different scales.

Families are socialist. Employees in the same job are mostly egalitarian.

These work because of trust within the small groups that any short-term imbalance in the distribution of resources will be restored in the long-term.

Capitalism shines on the scales where this kind of trust is not appropriate.