At every university I've attended, STEM grants are used to subsidize university operations.
(btw, it's an honor to cross swords. You're one of the people I most frequently CTRL-F on any threads even vaguely related to economics or finance)
The university basically provides two services in return for overhead: commercial real estate and outsourced HR. They vastly overcharge for both, and the excess beyond market rates for these services goes directly into the university budget.
Some real numbers (I was the grad student): a professor gets a $50k grant which he spends on a graduate student to be a research fellow for 1 year. The grad student gets $20k + benefits (roughly another $10k).
The university pockets the remaining $20k for incidentals and overhead. You seriously think loading the grad student into the HR system and making 24 direct deposits costs $20k?