Every society is subject to the problem you are talking about. That's why humans actually evolved to go at lengths to punish anybody who does defect. Without this sense (for fairness), no society could function. And as you correctly point out, mafia is the subject of the same rule. (That's why you usually get either a rigid hierarchical system or democracy, not so much a system where a large portion of population democratically controls the rest - that's unstable.)
The key in democracy is exactly what it says on the tin - one person one vote. This is much more stable to this devolution, because other people in society can observe when this rule is broken by anybody and take action. Thanks to this, much less energy is required for infighting, and people can be happier.