It's only the stupidest idea if you see it as 'low or medium cost' - if you see it as a high cost then you can understand that there is a strategic trade-off to be made (kids staying at home would clearly have a high benefit for controlling the pandemic, so that is the trade off).
A generation of students losing a year of high-quality education could represent a huge long-term cost, particularly considering that a lot of Europe's business is knowledge-work, and the impact education has on quality of life / socioeconomic factors.
Adding to that, kids at home blocks some adults who can work from working, and there is a multiplier effect.
I'm not saying it's the right decision, but to claim that it's "the stupidest decision" makes it sound like it's a no-brainer when I'm not sure it is.
We should sooner completely shutdown bars and restaurants before shutting down schools. Especially elementary school kids. They need to be in school more than we need entertainment.
I think more frequent, even if less accurate, testing would significantly help mitigate the spread by further isolating those who have a higher degree of likelihood for being contagious.