the value of harvard math profs isn't reaped by the undergrads, it's reaped by the grad students that work closely/directly with these profs. i'm not 100% sure of this but benedict gross probably isn't holding several hours of office hours every week for his undergrad algebra classes (although he might for the grad sections).
now the knock-on effect, obviously, is that the very good math phd students that pursue and are admitted to harvard do provide a lot of value for the undergrads (since they're TAing/holding office hours for those undergrads). but those same harvard phd students then go get tenure track positions at mediocre schools where office hours are held by profs. so it all evens out as far as undergrads go :)