Well there’s your comparison. The store brands are chemically basically identical to the brand names. But their market share is relatively low. So the advertising must do something.
I didn't make the claim it didn't. I was just reacting to that particular rhetorical question.
On this subject, though, there is more at play than just advertising. First is availability; smaller stores won't have a private label option available at all, so some chink of the market is not open to them.
Second is quality; this is not as much an issue with OTC pharmaceuticals since it's all about the active ingredient, but for products where more than just the active ingredient matters (like flavor or consistency) there is sometimes a quality difference. There definitely is with food.
That said, I frequently buy store brands over name brands. I also buy some "name brands" that I have never seen an advertisement for.