Copyright law is universal under the Berne Convention and it prevents unlicensed duplicates of the software from legally being distributed. This is not US law, it's law everywhere, even the
very few countries which are not signatories to the Berne Convention are signatories to TRIPS.
Gates does not hold the copyright for MS DOS 6.22 and it's not 7 years but 70. But yes, eventually yes, see how Sherlock Holmes became public domain. For PC software in 2024 this is not yet relevant, the Berne minimum is death plus 50 and the IBM PC is not yet 50 years old.