To me it comes down to some CS-specific version of Mike Tyson's (perhaps apocryphal) quote "everyone has a plan until they get punched in the mouth" - something along the lines of "Everyone has fun programming until they have to start debugging".
My city has several years of programming courses at the high school. A lot of kids sign up for the first year but the numbers rapidly fall off. They start the kids off with the basics and doing simple programming exercises. Generally they have fun while they are being successful getting boxes and lines to appear on the screen, but as soon as things get the slightest bit complicated and the students get into the weeds of debugging the enthusiasm dissipates pretty quickly.
It's not that most of these kids don't have the intelligence to tackle it if they wanted to; they personally just don't find it fun at all.