It is easy for anyone to state that they are unaware of a law, and if to say so was to aquit yourself of any crimes then it would be impossible to discern who was lying or not, unless there was specific evidence either way.
Also, since most laws are common interpretation of general moral or societal values, it is expected that most would understand what is right. Mistaking a law can sometimes excuse, providing you can prove that you were mistaken.