The short answer to "is this illegal" is "we don't know because it hasn't been adjudicated yet" and that's what courts are for.
The argument for it being illegal is pretty straightforward - Microsoft is redistributing code without following the licensing terms of that code. Sounds simple. But the counter argument is that Microsoft isn't actually redistributing code, but using that code privately without redistribution (which is allowed by virtually every open source license I'm aware of) and the resulting product doesn't actually contain substantial portions of the original code. The legal comparison will be that I can use GIMP (or a custom derivative of GIMP) to create a logo for my enterprise application without open sourcing that application _or the custom derivative I used_. That sounds completely unrelated, but think of it this way: The training system that actually creates the model is almost certainly covered by all manner of (probably incompatible) license terms. It's includes, in whole or part, millions of pieces of copyrighted code. It is a derivative of all of that code. But they aren't redistributing the training system. They are redistributing the thing the training system created, which is a product of the code, in the same way that an image is the product of GIMP.
Will this argument fly in court? Who the hell knows. My personal thought on the matter is the cat is probably already out of the bag, and was even before this whole AI thing. Legally, if you go on Stackoverflow and pull a 2 line snippet of code or a regex, do you now have to open source the entire 10-million line enterprise application you put it in? Yes, I think so. But everyone (except maybe a handful of companies with extremely tight regulatory requirements for sourcing code) just ignores that and does it anyways.