Trader Joe's has their own in-store brands for tons of products, which has spawned various guides on what should/shouldn't be bough there (https://www.thepennyhoarder.com/save-money/what-to-buy-at-tr... for example). CVS, on the other hand, is a far more general store. They both sell food, but they're not in the same market segment - so the comparison is strange.
wtf are you talking about? I do this (with other greens and vegetables). If anything, the people shopping at WF/TJ don't want a head of lettuce because it's a stupid product, but I think you're using that as an example...but using head of lettuce just makes me believe you don't understand the demographic.
It's not very surprising. When you take a broad meta-category like "groceries" and have 10x the number of locations, it isn't shocking that they would move more product.
Trader Joe's and Whole Foods target specific demographics. I live in a metro area of about 300k people and there are 1 each Trader Joe's and Whole Foods. There are probably 40-50 CVS outlets. Their sole income driver is margin on food. CVS focuses on market saturation -- their profit driver is drugs (a market in which they vertically integrate distribution) that are mostly 3rd party paid. They survive in food deserts because the money made on drugs offsets heavy shrink losses.
I heard accounts of ironically Whole Foods which is referred to as "whole paycheck" in other areas being the cheap option in some areas. I would guess traffic vs stock would also influence prices in non-obvious ways. With perishables, more expensive real estate, high traffic, and customers more likely to buy everything by foot they may be less of a speciality niche in urban areas than suburbs.