"Better for education" might not mean "better for undergrads."  It might mean expanding the sum of human knowledge through pure research.  That's a lofty goal that might frequently lie at odds with the upstairs-downstairs nature of actual grad school but enough good work comes out of large research-oriented universities to note.  Smaller universities and colleges that don't do much research can still contribute to a community in other ways - libraries, lectures, publications.  A lot of the benefits of higher ed to society don't come from teaching (or babysitting) undergrads.  That parallels the point of the OP - if you focus solely on the bits that make you money in the short term you may miss out on some other good stuff.