And note we're talking about the top firms here, in the same sense that Harvard/Yale/Princeton are the top schools. Outside of Goldman Sachs/Morgan Stanley/JP Morgan, hedge funds and private equity funds, and McKinsey, BCG, and Bain in consulting, the name snobbery drops of precipitiously. Lots of people from top state schools end up working at Deloitte, Accenture, etc.
Also, the stuff about grades versus traipsing around in Costa Rica is outmoded. My brother is an analyst at one of GS/MS/JPM, and his summer class is, to be glib, has a huge representation of 3.9+ asian math/science nerds from Harvard/Yale/Princeton. It's not 2007 anymore, hiring at investment banks is way down, and the days of 3.7+ with a great personality skating past the 3.9+ math nerd are over. To be sure personality is still a requirement, but quantitative skills are increasingly valued.
Also, people arguing that this is an inefficient way to hire are ignoring a basic fact of the business model: these hires aren't keepers. These firms are built on up-or-out models and forced attrition. Most analysts are hired for a two year contract and not asked to stay on board. In essence, the initial hiring decision is just the first round--the two years on the job as an analyst is where the top people are screened out. Indeed, this process never stops. Even at the partner level, which a very select few ever make it to, there is substantial forced attrition. GS adds 100+ partners every other year, but maintains the partnership at a pretty constant 500-ish people. You do the math on that.
By hiring only from Harvard/Yale/Princeton/etc, they are just making the bet that statistically good people are more likely to be found in that pool than broader pools.