Branding is an important solution to the problem of validating product quality..
Often the only difference between a brand item and the generic version is the label. The contents are identical. Branding doesn't validate quality in that case.
Here in the UK Kellogs actually ran a campaign telling consumers "We don't make breakfast cereals for anyone else." The generic shop brands cereals started to get good enough that people thought Kellogs were making the cheaper stuff as well.