That isn't how laws work, nor how they are intended to work. The purpose of all laws is simply to inform the public of what behavior is socially unacceptable and what the consequences are for committing that behavior. 

Now, most people don't need most laws as they are socialized, after all, ib our system they are the ones defining "acceptable." There are presumably some few people who are less well-socialized who -may- be deterred from acting by a given consequence (depending on their determination of the actual risk of getting caught and punished on a case by case basis).

But no law is actually intended, nor should any informed person so expect, to -prevent- a person determined to flout society's conventions from doing so. In those minority of cases the law simply allows us to punish offenders after the fact.

So the argument "Why have any laws?" isn't particularly coherent, once you have an informed and realistic knowledge of what laws are and can do.