Crime and deviance reinforce the consensus values, norms and behaviour of the majority non-deviant population. The difference between deviant behaviour and non-deviant behaviour are reinforced - this is known as boundary maintenance.
Durkheim said that deviance allows for social change to occur. If society reacts positively to deviant behaviour, it starts the process for that behaviour to be seen as non-deviant in the future.
However, Durkheim said crime becomes dysfunctional when the level of crime is too high or too low.