I believe the success of WOW as a whole was all about accessibility, whether we're talking about leveling, end game, or anything in between. That's ultimately why Legion is failing and will fail. They have mistaken showering people with gear for accessibility and time/RNG sinks for content, ultimately making raiding far less accessible for large swaths of players.
There are some great responses here about why vanilla WOW trounced the MMO giant of the time, EQ:
https://www.quora.com/What-made-WoW-...than-Everquest
By Wrath, the dev team had made a concerted effort to apply accessibility to the end game more than it had been in the previous two expansions. Despite claims to the contrary and only one difficulty level at the start, an incredible number of players raided in Wrath. More players raided in Wrath than are currently subscribed in Legion. There was also a healthy and thriving PVP community. Accessibility, a large quantity of quality content, and an engaged and excited community were the secret sauce that took Wrath to levels no one thought possible.
People like to point at a lot of things for the decline, but ultimately I think you can quote WOW itself for a primary one: "No king rules forever, my son". Expecting to stay above 10 million subs forever was probably not realistic, but honestly I think a big problem throughout the years was large sums of WOW revenue being diverted to other projects which caused content droughts or simply lower quality content to be released. This was WOD's major problem, in my opinion. Development resources were lacking and pet design ideas like the Garrison and Shipyard (attempting to turn WOW into a Facebook game) did not instill any sense of awe or excitement from the playerbase. You can even point to the number of dungeons and raids released in Wrath and TBC and compare them to subsequent xpacs as a barometer of the lack of actual productivity from the development team.