While every crime violates the law, not every violation of the law counts as a crime.
With institutional and legal machinery at their disposal, agents of the State can compel populations to conform to codes and can opt to punish or attempt to reform those who do not conform.
Whether a given act or omission constitutes a crime does not depend on the nature of that act or omission.
It depends on the nature of the legal consequences that may follow it.
Similarly, changes in the collection and/or calculation of data on crime may affect the public perceptions of the extent of any given "crime problem".
All such adjustments to crime statistics, allied with the experience of people in their everyday lives, shape attitudes on the extent to which the State should use law or social engineering to enforce or encourage any particular social norm.