That's not the heuristic companies use to determine whether or not to release source code.
> Windows 9x and classic Mac OS. No one has sold these OSes for 20+ years and they turned out to be evolutionary dead ends. It would make sense to release their sources so people could learn from them and run them on new hardware more easily.
The companies would not do that, for the very simply reason being that it would cannibalise their existing offerings if "people could [...] and run them on new hardware more easily."
The biggest competitor to Windows 10 was not Linux or Mac, it was Windows 7. The biggest competitor to Windows 12 will be Windows 11.