You got this so completely correct that it’s almost pointless to go on.
However, I’m procrastinating from doing real work.
Store brand items tend to fall into two very broad categories: those that are essentially identical to branded products but are cheaper because the costs of advertising and promotion don’t come into play; and those that are somewhat inferior versions of branded products and so are cheaper because they use less expressive components or workmanship.
As just seen with the dog food recall, some companies make the basic product for dozens of different firms, some branded and some not. This not only allows for enormous economies of scale but allows them to separate out the raw ingredients into tiers, with the finest going to the highest priced brands and and just over-the-line acceptable going to no-namers.
It’s the same principle as at the retail end, in which most categories of goods have a three-tier pricing structure of good, better, and best. Some people will opt for good, for any number of reasons, including inability to pay, not needing a better product, or being unable to distinguish among them. Some people opt for best because they can recognize quality, or are snobs, or just don’t care about price, or are unable to distinguish quality and are willing to pay for someone else to do so. Most people wind up in the middle. Stores know this. It’s powerful psychologically and economically, and stores that used to have just two grades of goods are now opting for the three.
Even so, quality is still an issue. I don’t know if you remember the fad for generic label foods from, I think, the 80s. You’d find cans of “beans” or “Cleaner” or whatever. (Several movies - Repo Man, IIRC - made fun of generics.) These competed on price alone, obviously, so there was quickly a run for the bottom to get the cheapest product on the shelves, which naturally destroyed quality, which led to them completely disappearing.
But it’s a waste to destroy perfectly edible food that is not perfect. Poorer apples go into sauce or cider or jelly rather than onto shelves. Beans are still good even if you have to pick around a stem. It’s an individual decision how to balance out price and quality for an individual product. We all do it every time we purchase anything, almost without thinking. There are cues in the marketing that guide these decisions. You can progress up the burger scale from McDonald’s to Red Robin to the Old Homestead Steakhouse and its $41 Kobe beef burger. You can go from Wal-Mart brand beans to Green Giant beans to Chef Fussy’s Gourmet Beans in truffle sauce. In each case it will be obvious to anyone who lives in the U.S. as an adult that the price and presumably quality will be different before a single bite is taken. (Sometimes, though, Kroger’s beans will be just like Green Giant’s beans, and there is no way to know until you do a side by side comparison. Kroger and Green Giant both know that there is a consumer who will make the pick in one direction and another in the other and so both make their identical product available.)
Is that enough “it depends?” Really, I have a lot of work not to get to. 