(note, the question only applies to laws that all
A) you know you won't get caught (or at least the other benefits of breaking the law outweigh the probability weighted costs of getting caught)
B) you know your peers won't look down on you (or the probability is sufficiently low)
C) you know you won't feel guilty (or the probability is sufficiently low)
D) you don't believe that you will suffer any supernatural punishment
E) your action won't lead to a significant number of others imitating your behavior, and in turn harming you. (this is an attempt to address the "what if everyone did that" response)
an example of this would be if you are in a parking lot, alone, at night, and you run a stop sign (they do have them). nobody is ever going to know or care, and i'd be surprised if i felt guilty afterwards.
the only response i could come up with is arguing that morality is a kind of habit, so this would lead to bad habits. dunno.