Luckily we have a huge amount of grocery stores in this area, it's really kind of ridiculous, to be honest, within a 20 mile radius we have 119 grocery stores, those are the major chains, then add in independents and ethnic, and that number goes well over 200 (yes I counted one day out of curiosity).
With this fierce competition, if your chain doesn't have good store brands, you are not going to last long.
I worked for a company that took a long time to get it right, they were going for the highest profit margin over quality. One year at our big annual meeting, they were doing taste tests to determine their next items to be offered as store brands. I remember trying 3 "pecan sandies" knockoffs, labeled A, B, and C. A, was great, maybe even better than the original, B was also good, but C was downright horrible and had a chemical aftertaste. When the votes were tallied, C got zero votes. Fast forward a couple of months and we now had store brand pecan cookies. I bought some out of curiosity and wouldn't you know it, they were C. Once again, profit margin won over quality.
When it comes to store brands, I find "ingredients" to be the best bet. Processed foods all have proprietary recipes and store brands don't often hit the mark. Dairy always comes from a commercial dairy and is likely the same as one of the name brand in the case (in our area Maola delivers both their brand and store brand). I don't buy canned vegetables with an exception of beans and tomatoes, and the brand in my store has always been excellent. I've had great luck with store brand frozen veg, and haven't felt the need to buy name brand.
We do have a "premium" store brand, and those are consistently good, but they are more specialty items and don't always have a direct competitor.
Stores make a HUGE markup on store brands compared to name brands, and a smart company will make sure that they sell a lot of their brand, it just makes a lot of business sense, profit wise.