There is an old joke that says a man was driving on a busy highway, keeping up with the traffic flow. He looks up in the rear view mirror and sees red lights. He pulls over and is told he was pulled over for speeding. As they are talking other vehicles continue to speed by. The man knows and admits he was speeding, but seeing others get by with it makes him angry so he asks the patrolman... you pulled me over for speeding, but everyone else was speeding too. Why just pull me over, why not everyone else?
The patrolman smiles and looks at the traffic going by. He says you do what you can do. It is like this, have you ever been fishing? The driver admits that he has gone fishing. The patrolman says "Well, did you catch all the fish?"
Some areas drug dealers are openly on street corners, each with their own territories. Sometimes, one will get caught, while others get away. Should the one caught be released because the others got away? Some murderers get caught while others get away. Should they be released until the others are caught? Some sex offenders get caught, and we all know there are many more out there. Should all the sex offenders be released because we didn't get them all?
So in answer to your question, IMO, if someone else does something wrong, it is not ok for you to do it too.
If the law is wrong, and others agree that the law is wrong, then work together to change the law.