Why does MIT require funding from the NIH?Because research nowadays is very expensive. Seventy years ago you could win the Nobel Prize with a cyclotron half a meter in diameter, nowadays you need the LHC at CERN to do that. And it isn't just high-energy physics, it's biology, chemistry, even computer science. Big data requires big storage.
Research grants go to research and upkeep of facilities (the dreaded indirect costs), tuition and endowment is for salaries, building projects and startup grants.
It's accepted that the mission of universities is to conduct research on behalf of the taxpayer, and that these results are public. Google is not serving the taxpayer, and that's why what falls out of their research is a trade secret.