Abandonware is rather illegal because it rather means software that has NOT been explicitly released for free download, instead someone put it online and noone cares about it because A) the original copyright holder (or someone who acquired the copyright from it) doesn't exist anymorer or B) it does exist but it does not know or does not care about its software being, well, technically
pirated. (If abandonware consisted of titles made free by their copyright holders then abandonware sites would only be mirrors; there's no point in that!)
The reason for not making the software available for free may be either laziness or, perhaps, the original copyright belonged to not only one person or company but many of them (e.g. both the developer and the publisher); then asking for the legal permission from
all copyright holders is just too much of a hassle. If the copyright holder still exists
and it's not too lazy
and it's kind of courteous, it takes the time to publish its own software for free and, you bet, you will definitely know about it because it's rare that a copyright holder does this.

(Mind you, this can also be thought of as advertising, e.g. in the case of GTA and GTA 2 being released for free when GTA 3 was current.)
As for how long the copyright is held, I don't know the exact number but it surely is similar to other forms of intellectual property: several decades. Knowing that, today, software gets obsolete within years, if not months, this is stupid. But that's money, politics, lobbying and taking into account what publishers (the guys who sell the software but add nothing significant to its value; except for, perhaps, user support) want instead of what the developers (the poor people who do the actual implementation and get pretty much no money for it) want so it's way above us, everyday users, too!