Not only that, but from an end-user perspective Steam is the superior platform - bigger game library, better client, mods, walkthroughs/guides, multiplayer integration, utility options etc. Meanwhile the Epic Launcher was clunky, barebones and missing nearly all the extras Steam had on offer.
Epic tried to offset this by giving out free games, but other than a few exceptions, most were trash, and even the ones that people actually wanted, the vast majority of people never installed.
Now, some can argue that it's not fair to compare a very mature platform like Steam, that had more than a decade to work through all the teething issues, to the new kid on the block, but ultimately the Epic Launcher is not competing with Steam from 15 years ago, but with the Steam of today. There's also the fact that Epic were apparently incredibly sluggish in rolling out updates and upgrades to their launcher, which just compounded the issue.
My guess is that they were banking on the Fortnite kids becoming Epic Store costumers, since their favorite game was on there, plus all the free stuff adding up to a "substantial" library, but failed to realize that Fortnite kids only really play Fortnite.
Ultimately, Valve won by doing absolutely nothing because Epic was never a threat to them. GOG at least has old classics and DRM-free releases, the Epic store has trash nobody wants, that they paid the developers to release on their platform.