"Does anybody have a reasonable explanation for why CS enrollment has declined?"
There was the dotcom crash... there's the slowing of growth as the market saturates (in the developed world, every person/company who wants a computer has one)... tools and applications have advanced to the point where it much easier to do most things (most things that people need can be done without coding).
The extraordinary thing about computer science is not that growth has slowed, but that growth continued for many decades.
I heard that, a few decades ago, Physics departments had very high enrollments, which eventually fell off.
There was the dotcom crash... there's the slowing of growth as the market saturates (in the developed world, every person/company who wants a computer has one)... tools and applications have advanced to the point where it much easier to do most things (most things that people need can be done without coding).
The extraordinary thing about computer science is not that growth has slowed, but that growth continued for many decades.
I heard that, a few decades ago, Physics departments had very high enrollments, which eventually fell off.