Oh man, MAS is quite a rabbit hole. It basically tricks Microsoft's server to give out valid windows license.
How does it work?
In the official upgrade process from Windows 7 to Windows 10, Microsoft provides an HWID (digital license) activation for Windows 10 without any cost.
In the background, the upgrade process runs a file named gatherosstate.exe (available in Windows 10/11 ISO) and it checks the license of current Windows if found activated, it generates a valid GenuineTicket.xml ticket which is sent to Microsoft and in return, MS authorizes a license.
So if we just convince the gatherosstate.exe file that the conditions are met for ticket generation by fooling it, it will generate a valid ticket, which can be used to get the valid HWID (Digital license).
The fact that this tool is hosted in a Microsoft-owned website (GitHub) is crazy, lol. Or maybe Microsoft doesn't care and just want more people to use Windows, so they don't crack hard on this.