There are many legal definitions of crimes depending on the different jurisdictions. Since these definitions are different, they are apparently arbitrary and invalid as universal definition or general principle.
In fact every human being knows quite well, what is a crime without the need of arbitrary codes of law that are only locally valid.
Universal Definition of Crime:
Crime is the initiation of violence or the threat thereof.
Definition of Violence:
Violence is causing physical or material harm to somebody (victim) without his/her consent.
These definitions cannot be disputed even by a criminal. For example a thief would not dispute that theft constitutes a crime and argue that it should not be persecuted, because he trusts that the property that he acquires by his illegal act will later be protected as long as his illegal act is kept secret. If he did not trust that his illegally acquired property was protected, the theft itself would not make any sense, because the acquired property could be taken away from him at any time and he could not claim protection for it. The concept of protected property is a prerequisite of the action of theft. Without this concept, theft would make no sense. Therefore the universality of this definition of crime cannot be disputed even by persons who intend to break this rule, because if they dispute it, it would turn against themselves. This definition of crime is therefore a tautology.
However modern laws go far beyond this definition of crime. They have established so called "victimless crimes". Known examples are laws against drugs, the possession of weapons, prostitution etc.
These laws are a logical problem. They openly violate the definition of a crime as the initiation of violence. By disrespecting the principle of not initiating violence, they take away their own justification. If those who establish these concept of "victimless crimes" dispute the principle of non-initiation of violence, they have to accept that violence can be initiated against them on the same legal grounds.
Persecution of anything that doesn't fulfill the above definition of crime constitutes a crime by itself.
If persons who possess drugs or weapons and have not harmed anybody are persecuted by the state, then the state itself has initiated violence and becomes a criminal. The victim would have the legitimate right of self-defense and to use violence against the unprovoked aggressor, which is the state in this case.
By disrespecting the principle of "not initiating violence", laws have lost any logical justification, because if the initiation of violence is legal, violence could even be initiated against state representatives without provocation. By disrespecting the universal definition of crime, a state deprives itself of any legitimacy and turned the rule of law into a reductio ad absurdum. A law that punishes victimless crimes is no law, because its premises are contradicting. Such a law is only an arbitrary act of aggression.