Copyleft licenses are more troublesome for those who would rather not release source code. GPL is being used as a stand-in for all copyleft licenses.
Courts -- under common law jurisdictions -- don't interpret contracts and licenses literally. If you stick within the spirit of a license or contract, you might be okay (even if you break the letter), and vice-versa.
Beyond that, it's a question of damages and consequences. Omitting a warranty disclaimer isn't likely to result in a lot of damages.
And finally, there are odds of getting sued. If you infringe on my AGPL code, I'll be pissed. I used that license for a reason. On the other hand, I /hope/ my MIT-licensed code is reused in commercial products. If you infringe on some term, I probably won't care.
There's a lot more nuance than that, starting with statutory law jurisdictions like France to things like statutory damages, and I'm intentionally oversimplifying.
However, from a 10,000 foot view infringing on the GPL versus on an MIT license are very different beasts, and there's good reason to be a lot more worried about the former.
Also important is attribution.
https://docs.github.com/en/site-policy/github-terms/github-t...
Chapter D4 gives microsoft the right to: parse it into a search index or otherwise analyze it on our servers
I don't know what a real court says, but I can imagine a lawyer saying training an AI is done by analyzing your code.
Chapter D5 gives almost anybody right to do a lot with your code, including creating derived works, as long as it happens on github. If the AI training happens on their servers, I think you agreed to them training an AI.
Not saying they are doing it right now based on that document. But I do assume a lawyer has enough material to make the waters really muddy, and a trial being decide by basically a dice roll.
What happens if someone else uploads my code to github?
What happens if proprietary code is uploaded to github?
What happens if national secrets are posted to github?
In all of those cases, the person doing the upload does not "own" the content, nor did they choose the license.
There is no reasonable read of a ToS agreement that would allow Microsoft/Github extra rights to that content.