@GarlicGrace
Supermarket foods in particular; it's often obvious that they're the same product from the same factory, even in the same packaging with a different label.
They're really not at all. In previous jobs, I've been accountant/auditor to a number of food processing factories, mainly sandwiches, pre-packed salads, cooked chicken meals, sandwich fillings and marinades.
They use different quality raw ingredients depending on the customer, which for most of those was a mix of convenience stores (the likes of garages, Spar shops, small independents, etc) and a few big brands (the likes of M&S, Tesco, Booths, Asda etc), and depending on the range, i.e. whether the brand's premium or bargain range. That's different mayonnaise, different quality of meat, different quality of salad, eggs, etc.
For example, for the premium brand, they'd use local free range eggs which they peeled and cooked in house, whereas for the bargain brand, cheap range, they'd use imported eggs, pre-cooked and pre-peeled. They'd also use a lot more frozen foods from places like the Far East, such as pre-cooked frozen chicken pieces for cheaper ranges but local fresh chickens for premium brands.
Product traceability (in case of health alerts) and product separation (for vegan/vegetarian etc options), are a huge thing in food processing factories, so there really is no "crossover" of using the same ingredients for different batch runs. At the end of a batch, for say, Tesco, the entire production line is cleaned, ingredient bins emptied and cleaned, etc., and then it's all restocked with new/different ingredients for the next batch, which may well be for Waitrose!
It's one of the biggest myths going that you can get exactly the same thing with a different label! It just doesn't happen. (Well maybe it can happen in dodgy factories, as anything goes when rules aren't adhered to - just look at the horse meat fiasco!).