I went into massive debt attending CMU, when I could have probably gone to a perfectly good university for free, but I've seen first hand (and been told by recruiters) how much just having THAT university on my resume has affected my prospects, and so I still think it was worth it. That's not to mention the other experiences afforded by attending a world class university like research opportunities, internships, etc. which all sort of serve as a positive feedback loop for improving the prestige of the university and it's alumni.
Google famously said they didn't really observe correlation between alma mater and performance BUT it only applied to folks they actually hired.
My freshman year at MIT, I roomed with a guy who was a highly ranked chess player, and one of the smartest people I've met. However, 18 years of having the rules never really apply to him and never being forced to actually focus really hurt his work ethic. He was plenty smart enough to graduate from MIT, but failed out due to a lack of focus.
There were about 1,000 people per grade in my high school, and people occasionally asked me if I was as smart as the girl a year ahead of me who went to Harvard. There was really no question that by most measures of intelligence, I was the smartest person in my grade. I was getting strait As in honors-level math classes at the state university while in high school. I got 800 in both the SAT I Math and SAT II Math sections, and 790 in the Chemistry SAT II. My chemistry teacher just started marking my scantron sheet as the answer key, and the day after every exam, the whole class would go over my exam answers on the board to see if I had made any mistakes. I ended the year with 9 points above 100% in Chemistry because on the first exam, the second highest score in the class was 90/100, so the teacher just added 10 points to everyone's scores. I made one mistake (at least mistakes that got caught) later in the year in chemistry. In my university honors-level math classes, I would bring a newspaper and read, until one day where the TA asked a question that nobody else in the class could answer, so I folded up my newspaper, figured out what was going on and answered the question. The professor (standing off to the side) got red in the face and pulled me out into the hallway and said "I don't care who you are. I don't care what kind of grades you're getting. If you bring a newspaper to class one more time, I'll get you thrown out of the honors program." It was good for me to interact with others with similar experiences growing up and get a drop or two of humility.
Your mileage may vary.
You don't get to MIT without a combination of ability and internal drive, but for most of us, the external drive was also very beneficial. The comradery also really helped me push myself harder.
I'm in the middle of the Standford introductory compilers MOOC right now, but with a self-paced online course, the atmosphere is just very different from being surrounded by really bright and passionate people trying their best. Not everyone needs or benefits from that sort of environment, but I found it very helpful.
IHTFP
In high school, I took 6 trimesters of honors-level math at one of the "Public Ivys"[0], and my senior year of high school I was taking a full course load there plus 1/4 course load (band class) at high school. I got all As, except for a B+ in Intro to World Politics, without working very hard, driving 45 minutes each way to and from school. It was a good education, and I could have gone there on a full ride scholarship, but I still feel MIT was worth it.
At the "public ivy", I would have gotten better grades, and probably would have put more effort into personal projects, but focusing on personal projects is very different from focusing on things you have to do, and I didn't really have to focus on my school work at the "public ivy" in order to get above a 4.0 GPA. I probably would have had to have waited until after school to learn how to pick myself back up after failure.
On the other hand, I don't think I would have found some other top schools as valuable. I have a friend who graduated with a CS degree from an Ivy League school and then came to MIT. In his experience, that Ivy treated students like they already worked very hard to get into school and deserved high grades, but it seemed to him that at MIT the culture was very different, seemingly even for undergrads. What I've read about the grading curves (median GPAs, percentage graduating with highest honors) at some of the Ivys seems to match up with his observations from that one Ivy.
Smart kids often come away thinking they are the smartest and that they don't need to learn or understand anything else, thanks to our cheer leaders. This can lead to cognitive and behavioral fallacies, expertise in some narrow field gives themselves the idea that they are smart and qualified in domains outside of the scope of their expertise. Meeting other smart people, exposure to domains outside of one's own scope of expertise tempers that to a degree.
In retrospect the most valuable thing about my college/university experience was meeting people from different backgrounds (financial, social, educational). High school was too homogeneous.
The rough trend was that success with STEM degrees was less reliant on the prestige of the institution where it was acquired, whereas arts/humanities degrees required prestigious institutions (and the connections that they afforded) in order to attain prominent positions in some time period after graduating.
STEM degrees are way more standardized too. Good CS degrees are pretty much all the same in terms of content, from Stanford to State U and abroad. Same textbooks used universities for most classes (maybe a localized translation by a local professor).
Or, imagine how many premium SV start-ups have those MIT/CMU/etc. guys and what advantage you can leverage if you come out fresh from the same university. Maybe you are even taught by the same prof :D