There is a law, that does not mandate cookie banners, but that still causes them by creating incentives to show the banner. That's the point of criticism.
But Volkswagen was very discreet about it, and when uncovered everybody was against them. Website are being obnoxious, instead, and people accuse the law. Go figure!
It's a stretch though. I prefer more obvious analogies.