Before Steam, 99% of PC games were on CDs. Getting updates/patches for the game was a nightmare because you had to use a variety of sites and there were incompatibility issues. Adding expansions to games was also often problematic - I have game version 1.3, expansion needs version 1.3b or it won't work etc. There were also issues with validating the CD key online and many other problems.
When Steam came out, Valve used it to simplify the patching/update process of their own games. Later on, they realised that there's nothing stopping them from applying the same rules for any game and that there was no real competitor on the market for such a platform. As time went by, Steam became less buggy, faster, more streamlined which attracted more customers and more developers/publishers. When they started doing holiday sales, Steam's popularity exploaded and it's been growing since.
Since then, there have been some competitors but even if they do everything right, they can never truly compete with Steam, there's only so much you can improve in an online gaming platform and people generally dislike change (something similar happened with Windows and Google).
Long story short, Steam became popular when it had no competition, it does its job decently so any improvements its competitors offer are too small to cause an influx of customers to their product.