Something had to be done...this is something
There's a bandwagon out there that suits politicians to jump on because it has popular support - it's a vote winner (or maybe just not a vote looser) and extra kudos if you can imply that anyone not agreeing with the general principle that children must be kept safe is clearly a danger to the public if they got into office. There's no need for elected people to worry unduly about exactly how the rules will work - or even if they do work - because they can say something has been done and take the credit for being on the side wot dun it.
Want to genuinely protect children both online and in real life? Here's an idea: start with parents and potential parents. They have a responsibility to teach their kids that the real world has real dangers and it's their job to educate them so they go into life suitably equipped. You'll end up with a more rounded, capable and mindful population as a result. Mind you, there's no votes in that and it'll take a generation or two - so, politically, it's pretty much a non-starter. At the moment, when little Johnny turns out to be a wrong 'un and drowns the neighbours cat, too many people blame the state for failing him rather than give any thought to his parents being irresponsible fuckwits.
Legislating against technology on the other hand is always going to be, at best, whack-a-mole: kind of by definition, technology has a habit of finding new and innovative ways to solve challenges.