It's not that people always buy the more expensive product.
They were saying they didn't realize it had a name.
I'm not sure the effect is logically sound -- before the price hikes you weren't willing to pay a dollar more for name brand (or premium drugs etc), but after the price hike you are? I'm not sure if the authors have a mathematical model supporting the decision, or are just observing illegal drug markets and generalizing.
Imagine that 10 normal people and Bill Gates want to buy bottles of wine. Bill goes for a bottle of $6000 Richebourg Grand Cru, and the 10 normal people always go for Shitscreek Red, sold for $4. So about 9% of the buyers are willing to pay extra for the name brand.
After the Great Wine Tax Bill of 2021, the prices are both increased by a fixed per-bottle amount of $6000. So now the Richebourg costs $12000, and the Shitscreek costs $6004. The 10 normal people migrate to beer, and Bill Gates still buys Richebourg. So about 100% of the buyers are willing to pay extra for the name brand.
A similar irrationality is when people will do an extra hour's work to save $50 off a $100 purchase, but not to save $50 off a $10000 purchase.
Now, imagine that someone puts a tariff in place so that the low quality product now costs ten dollars, and the higher quality product costs eleven dollars. Sure, you might still buy the lower cost product, but if you are going to buy the product at all, the incremental cost of spending eleven dollars instead of ten dollars seems much more worth it. As long as you have to spend ten bucks anyway, might as well spend eleven and get a higher quality good.