Maybe they should open source the loader instead of offering a solution to already solved problems so people don't have to resort to using third party loaders for on-prem gaming.

The game is still a licensed game though. You technically must pay it and go though proper verification to start the game. (Although it's a 100% public secret that how to load it as you want, and basically every single mod dev kit does that for local dev)

I guess Microsoft won't want to deal with the license issue of publishing the loader part.

I doubt they care about this or that license. They just want people to upgrade.