Universities get a lot of money from other countries paying full price sending their students abroad. I don’t know if illegals would be a part of it, but if they overstay a student visa, then yes.
It’s very difficult if not downright impossible for a foreign student to overstay a visa. The F1 student visa is directly connected to full-time status as a student and the intl student offices on campus keep a close track.
It like the rest of the immigration system - illegals commit crimes and benefit - those who come here legally and follow the law pay the price (literally for nonsense such as DACA, DREAM, etc)