I think they do some private branding of OEM products. That means making a deal with some manufacturer—let’s say General Mills—to put Trader Joe’s brand name and packaging on their product. So let’s suppose they make a deal for Cheerios, and package them under the name Joe’s O’s, but they are the same product. Trader Joe’s can sell them for less because they do not have to figure in an advertising budget just for this product; it gets the sales advantage of advertising the Trader Joe’s brand. Once people are in the store, they can see the bargain products (deliberately packaged with enough similarity so it’s not hard to guess who OEM’d it).
I can’t say that they do in fact do this; I am not privy to their arrangements. But this is how it does work for a lot of products in the marketplace. Sometimes they give you hints on the shelf labeling; for example, a label under Walgreen’s brand Wal-Dryl that says “Compare Benadryl at $~~.” That’s as good as telling you they’re private-branding the Benadryl product.