This is a good question. There are some fair-use aspects going on given the retired and not at all supported status of the software.
Tool itself should be legal as long as it contains no Microsoft code, even though doing this procedure with an illicit product key is definitely not, but equally unlikely they will do anything about it. Microsoft still hasn't - and likely can't - patch the HWID-based Genuine Ticket vulnerability in their current activation system, as every system which has activated itself by upgrading from Windows 7 during their official free campaign, and ever since really (this never stopped working and they never retired the Windows 7 upgrade free offer even today) intentionally used that opening. All it took was someone creating a tool for HWID ticket generation, and you see where I'm going with this. And yes, it works on all editions... even those which were not supported by that upgrade offer.
Instead of pursuing WGA for end-users aggressively like they used to, their lax approach focuses on getting people to spend money in services which are integrated into Windows nowadays, such as the display of sponsored content in the lock screen, Store purchases, Microsoft 365, OneDrive and Xbox Game Pass subscriptions, etc. - while keeping tabs on businesses which need to have their software licensing audited. Given that they have their OEM licensing fees pretty much guaranteed from pre-built brand name systems, it is likely more profitable than selling a single Windows license to that individual regardless of the edition, and overall? I'd say it worked.
Ensuring that businesses have their licenses up to date is where they really make money - no one wants to fail an audit and get in a legal battle with Microsoft, if they do so it's more than likely they will try to settle and pay whatever Microsoft asks for it before it turns into a legal problem: it has happened in my country, back in 2017,
an university in Rio de Janeiro lost a legal battle against Microsoft over pirated copies of Windows 98 and Office 95 was forced to auction its main building in Ipanema (in Portuguese, use a translator) to settle a debt to the tune of 42 million Brazilian reais, in one of the biggest copyright infringement cases I'm aware of in Brazil.
To prevent people from willingly staying in outdated versions, they've been aggressively retiring software repositories for legacy versions of Windows, making it impossible to update or maintain them even if you install them somehow. This becomes an especially difficult problem to manage for localized versions of Windows, I've been trying to set up a PT-BR language VM of Windows NT Workstation 4.0 for nostalgia reasons, but getting the updates, hotfixes and tools for this OS has been practically impossible. I recently found a blog someone made in 2015 and uploaded most of the stuff that I need to find (such as the now-elusive offline installer of Internet Explorer 6) onto 4shared, which mostly defunct locker site at this point... I think I'll cave in, make the account and download the stuff while I still can. Even in English, it is not very easy to find all of the updates and improvements that these ancient versions of Windows need to be fully functional and operational.
I wouldn't be surprised if the Windows Update servers for Windows Vista and 7 were shutdown soon, btw. I would use that WSUS Offline Update tool and keep a copy handy for the future. Windows XP's is already mostly non-functional, you have to install all root certificate updates, newer versions of the update engine and also use Microsoft Update instead of the plain Windows Update... and it's still hit or miss, last I tried a couple of years ago.