But in the case of the hat, or any other tangible object? You can't enjoy it or use it simply by having a photograph of it, so I'm not sure any theft of that intellectual property has occurred. Bit of a grey area.
The enjoyment of some tangible objects is to see them, so yes, having a photograph does let you get the benefit of the object. The hat in the OP's scenario is meant to be worn, but it differs from other hats in that it's also (arguably primarily) meant to be SEEN.
ETA: I have also seen some craft carts sell post cards for some small amount - one I'm thinking of is a figurine seller - she didn't want photos taken, but you could buy a postcard with high quality photo (and her details/website on the back) for ~$1.