In the case of TFA, UIllinois claims ownership over some of the things made by students; it's part of their conditions for enrollment. This kind of thing is more common than most people realize. http://www.bot.uillinois.edu/general-rules http://otm.illinois.edu/studentownership
Here is the Honor Code from the university[1]
I don't see any mentions of the words "share", "distribute", "post", "online", "github", etc.
What I do see, is a lot of talk about plagiarizing other student's work and passing it off as your own.
The github repos did not do this -- other students did this. You punish the students who commit the act of plagiarism -- not the source. You don't ban a book because somebody plagiarized it.
[1] http://cs.illinois.edu/current-students/undergraduates/polic...
"As described in the Student Code, aiding someone else's cheating also constitutes cheating. Leaving your program in plain sight or leaving a computer without logging out, thereby leaving your programs open to copying, may constitute cheating depending upon the circumstances. Consequently, you should always take care to prevent others from copying your programs, as it certainly leaves you open to accusations of cheating."
Did the university contact each student and request to have the student remove the repo? Unlikely given the sheer volume of repos in the takedown request.
Irregardless, the University should have measures to deal with this internally if they felt so strongly about this cheating rule.
That said, they didn't do that: they used the DMCA. Their use of the DMCA is a strange choice in my opinion, but is likewise valid if the repos contain original work created by the university as part of the problem set.
Direct quote from your link.
That said, the DMCA does not prohibit students from encouraging others to neglect their own education, it exists to enforce copyright. IANAL, but their case that they own the copyright over the repos because their syllabus includes the questions being solved doesn't seem very solid.