The EU didn’t tell those sites to show cookie banners, they just told them to stop collecting people’s data without their consent. It’s the sites that interpreted that as “annoy people until they consent so we can keep collecting their data”. That’s not really the EU’s fault, although they should have seen it coming.