In primitive societies, people punish those who deviate because their similarities hold them together. So, people in primitive societies often use repressive laws which try to control or repress deviance. In advanced societies, folks punish those who disrupt society because their cooperation holds them together. Thus, people in advanced societies tend to use restitutive laws which try to restore order or provide restitution. Recall, no society is entirely primitive or advanced.
All societies fall in between.
Think about the laws in your country. Durkheim wrote a great deal in these books about human society in general, but this discussion will focus on what he has written about deviance and social control. Durkheim's reply to Adam Smith's Wealth of Nations was The Division of Labor in Society . Although Adam Smith wrote about morality and sentimentality in the Theory of Moral Sentiments, he is remembered for what he wrote about the supply and demand of goods and services, and how satisfaction of old demands leads to new demands which are in turn satisfied by eager entrepreneurs. Smith described how specialization resulted in economies of scale.