The EU said "you have to ask for permission before forcefully sodomizing your users", and webdevs thought "let's ask for permission" rather than "let's not forcefully sodomize our users". Of course, the law could have said "don't forcefully sodomize users", but it seems the west is still under the impression that some people will do the right thing, just because, sometimes. (maybe 20 years ago they would have, just because, sometimes, but they won't now)
I used to have long conversations with frontend developers that "no, when I log on I don't want to be forced through a look-at-the-new-feature-we-made" sequences. And then they went ahead and did it anyway. And usually whatever flag they tried to set to make sure you only saw it once would malfunction, so next time you'd get to click through it all over again.
(If you want to tell users about new features, show a unread flag on a notification icon and make it a one-click affair to make it go away. Don't get in users' face with stuff they don't want)
"Damn, I'm being asked to put a cookie into this site that will maybe result in some guy seeing an ad about a toothpaste he might buy at some point in the future.
I'm going to risk months of unemployment and explain to my family why this is more important than eating when I get home. The internet is serious business, they'll understand."
-- the hypothetical webdev in that scenario, I guess?
If you can get replaced over something so minor, it means there's dozens of capable bootlickers lined up and ready to do it as soon as you're gone, so yes, there is a webdev problem.
You can try to put the blame on the grunts, like trying to focus on the engineers in the VW Dieselgate, etc, but that is very weak leverage. You have to intervene at the root cause of the incentive. But of course the higher you go, the more there is a blur between legislators and business owners and they won't be harsh to themselves.
You don't really need a web dev to add a cookie banner these days, but you probably still want one to build the actual site (unless it's simple enough to be fully site-as-a-service, in which case there is really no webdev at all).
Be it the EU for regulating disclosure and consent requirements, users for being "lazy" and usually just accepting all, or the webdev for not staking their livelihood on denying the banner - I'm sure they'll all get blamed before someone sees the ones actually demanding it be done can be the problem.