It is pretty ridiculous in these cases, honestly. This particular picture didn't have a "photographer's studio" setup - it was an outdoor picture with the family around a long, metal farm gate and the photographer sold the customer the CD. There wasn't much the store could do to prevent this, and we had to start physically checking a lot of pictures at that store.
...Why does a pharmacy print photographies? I've never heard of a pharmacy selling something that isn't drugs.
For instance, here's a US pharmacy chain – notice it mentions photos on the home page.
They're "convenience stores" in the sense that they also sell things like soap, laundry detergent, toothbrushes/toothpaste/floss/mouthwash, paper towels, toilet paper, cleaning supplies, etc. It has nothing to do with getting people to buy more drugs, it's just another thing to sell. Stores in the US tend to be bigger and stand alone, so if you've got a sizable building you want to fill it with something to sell.
Since someone will go there to get their prescription filled or pick up some Asprin, it makes sense to start selling vitamins, then some household essentials, and before you know it Walgreens is selling fruits and veggies.
Pictures being printed in pharmacies have been around since 90s, at least.
However, I've not been able to find any evidence of this. It could just be a just-so story.
Example: I worked at a pharmacy with the self-serve digital photo services. A customer brought in a CD and made christmas cards from a family picture.
It turns out the picture was taken by a local photographer the customer had hired. The pharmacy I worked at got the legal notice. Supposedly, we were partly to blame since we profited off of the cards the customer printed. Nevermind the fact that we didn't generally check the customer's pictures, nor could we actually have guessed these were professional vs a good picture.
The customer cropped out the identifying marks. We had all seen pictures that looked professional, both in digital and film form. It seems none of that mattered. It wouldn't be Kinko's fault that you photocopy an illegal ad, but they can be party to the fault by allowing it to be sold.
Now, the USPS probably has completely different laws protecting it. I'm going to guess it is more likely that they try to get you for mail fraud rather than actually hold the USPS responsible.