Re-affirming the Boundaries
Everytime that a person breaks a law and is taken to court, the resulting court ceremony and the publicity in the newspapers, publicly re-affirms the existing values.
Every so often when a person is taken to court and charged with a crime a degree of sympathy occurs for the person prosecuted. The resulting public outcry signals a change in values and, in time this can lead to a change in law to reflect the changing values.
A third function of crime, according to Durkheim, is to strengthen social cohesion. He point out that when particulary horrific crimes have been commited, the entire community draws together in shared outrage and the sense of belonging to a community (social solidarity) is thereby strengthened.
Deviant acts may be functional as a form of pressure release.