This is actually a well-studied effect in psychology. It's called social loafing: if someone sees another person violating some rule, they are much less likely to feel obligated to follow that same rule. Rules can be unspoken or written down, the effect is basically the same.