In the early 2000s it was widely perceived as the economically smart thing to go into a technical field other than CS, especially petroleum engineering, chemical engineering, and similar areas, or maybe even better, a non-technical field like law. They had higher pay and were seen as more stable employment options. CS employment was seen by many people as unlikely to ever fully recover from the dotcom crash, partly because of mass outsourcing. So unsurprisingly, new enrollment numbers were low, and some departments at smaller schools even closed. Then from around 2005, CS began to be seen as a lucrative again, and enrollment has been steadily rising every year since then. Universities have responded likewise by reopening CS departments, hiring more faculty in existing ones, and increasing class sizes (so enrollment growth is actually considerably outpacing faculty growth).
This does not look to me like a market that fails to respond to economic incentives, but exactly like one that does respond. Maybe it ought to respond even faster, although if it did in general, the CS-degree crash of the 2000s might've been even deeper than it was.