Adjective association
Solution 1:
A sentence containing a noun with multiple modifiers would be confusing to read if there was not some common understanding regarding what modifies what.
Though it's not an absolute rule, the modifier closest to the main noun is most commonly presumed to modify that noun.
a big red silk hat is understood first and foremost as a silk hat, specifically a red one, and big in size, as one cannot modify red with big. A soft red silk hat, because soft usually doesn't modify red, would be understood as a soft silk hat which is red. One might avoid initial confusion in a bold red silk bear by hyphenating bold-red.
Similarly, a big cookie jar is understood to be, primarily, a cookie jar which is also big. A cookie jar for big cookies might be described as a wide-mouthed cookie jar just to avoid that potential ambiguity.
This is an interesting thread about adjectives.
Solution 2:
If the jar contained big cookies, it would be a big-cookie jar, not a big cookie jar. When there is no hyphen, the reader will assume that big and cookie are both modifiers of jar, because that is the default assumption to make.