Actually, I believe there is precedent for laws being struck down for pretty much exactly this reason. I think prohibition and the newly changing attitude against marijuana and the laws surrounding it are examples of this.
If the majority populace is committing illegal acts it's often because they believe the act should not be illegal. I believe that many/most laws exist for the exact opposite reason. Murder is illegal because most people believe it's wrong. So we created a law saying so.