Git and Mercurial both were initially released in the same month (April 2005), and DVCSs had existed for some time before [0]. Linus even considered Monotone, which is also based on SHA-1 hashes, as a replacement for Bitkeeper before starting his own Git. Most people who worked with both Mercurial and Git consider Mercurial’s UI to be superior. It was mostly the draw of Linus and then GitHub that made Git “win”.
[0] https://en.wikipedia.org/wiki/Distributed_version_control#Hi...