This is a fun question and there is an answer. However, a little background in law is important. The most important point you need to know for this question is that law in America is partially based on common law or based on precedent. This basically means that the rulings of the courts become the basis of law for the future.
Based on this point, you can imagine if a court ruled that a person had to pay a certain fine to a neighbor, because his or her dog barked incessantly and that neighbor could not sleep and go to work the next day. Now imagine someone read about this case and took it out of context. He or she might say something like: no dogs are allowed to bark after 8 pm. This might sound like a trivial or stupid law, but there is a context.
So, many trivial laws are based on precedent and taken out of context.