In some ways its a "low risk" incubator. You get paid to attend, and a stipend, in most cases. A lot of research ends up being the basis for a startup company. And if it doesn't you get a PhD, which is still very marketable.
The downside of doing a PhD in CS, especially at a top 20 program, is really just the possibility that you may have hit it big in the 4-6 years you were getting your PhD. But of course you have to factor in the fact that being in grad schools opens new doors to hitting it big.
Plus, at least for me, the college life is just fun, and something somewhat hard to replicate a few years out of college.
Even so, Matt Might (who is a CS prof) writes, 'There are few good reasons to get a Ph.D. "Because you want to become a professor" might be the only good one.' [1]
Unfortunately, there is little push for change from anyone but the students: in the existing system, grad students and postdocs provide research and teaching at lower cost than alternatives which are more humane to students and less wasteful of human capital.
Prospective students need realistic information when they are choosing to enroll, but people choose to follow their passions at long odds in many fields (entrepreneurship, Hollywood, pro sports...). The mental model many have of PhD programs is apprenticeship; a more appropriate model might be an extended audition.