Note that your example is not a new “goofy small law”, but an industry losing a lawsuit because of complete failure to present relevant evidence in a lawsuit applying a long-established, big (but maybe still goofy) law to them.
With the result being a goofy warning on something benign. The practical result, that helps no-one (probably harms, with desensitization of cancer warnings through obvious government driven misapplication/ineptitude), is what makes it a goofy law.
I'm not in California, but growing up at least, I associated it was goofy small laws like this (along with not so goofy real laws as well).
[0] https://www.cbsnews.com/news/starbucks-cancer-warning-judge-...