The US chronically underfunds pre-college education. Universities are typically flush with money coming from grants usually from the government but also rich people. Often a large fraction of the grant money a professor obtains is siphoned off to dean's lush funds which help support education, hiring top professors, etc.
It’s rare for a large fraction of grant money to be siphoned to a Dean’s discretionary fund. Typically some smallish fraction (maybe 10%, often significantly less) of indirect costs (which, depending on the funder and the negotiated F&A rate may be anywhere from 0% or nearly 100% on top of the direct costs that fund the research staff and materials, etc.) goes back to the subdivision overseen by that Dean to do with as they please. Everywhere I’ve worked, that amounts to a few (low single digit) percent of total costs being used in the way you describe. And many places return none of indirects to the unit overseeing the PI and so then it’s a cool zero percent.
The similarity you see between this DeepMind project, the DARPA program, and research in Tenenbaum's lab is not incidental: there's a steady stream of crosstalk and cross-training between machine learning researchers who engineering artificial intelligences and cognitive scientists who reverse-engineer human intelligences. (Note, for example, that Peter Battaglia, one of the co-authors of this DeepMind project, was a postdoc with Tenenbaum.)
I work at University and I only publish Open Source (GPL, MIT, or CCBy). It would be hard for my University to claim IP rights after I published something with these licenses.
At many universities (in the U.S. at least), on paper, it’s the technology commercialization department that makes the call about pursuing patent protection and the burden is on the PI to report all potentially patentable inventions before release so that the university has time to make the determination. In the case you describe, they’d in principle find you in violation of that policy, but in practice can’t because they don’t know about it unless you tell them.