When it comes to versions, I've played pretty much all of them. The earliest versions were sloppy and contradictory with some good things (obviously) but weird math for things like THAC0 and a lack of overall consistency and coherency. WotC cleaned up a lot of that with 3E and developed a solid basis. But in order to have an effective PC you really had to know what you were doing. I enjoyed it, but there was a huge barrier of entry and it fell apart for me at around level 14 or so. I gave 4E my all but it simply didn't have sticking power. I remember watching a livestream of people playing 4E early on and it was painful to watch. It was mostly people staring at their character sheet trying to figure out what they could do. It had some good ideas but it just wasn't the game a lot of people wanted and was a pretty dramatic change of direction from previous versions.
Then 5E came and it felt like they had finally gotten it right. Felt like the 3E and older games in play with cleaner math, more consistent approach and much easier to play for most people. It's never going to be everyone's cup of tea but I think it has the best overall design yet, keeping in mind all the compromises it has to make to have broad based appeal.
Of course it's not perfect, can be improved and will never ever appeal to everyone. But I still think that the design of the game is the majority of why it's successful in ways that most previous versions simply hadn't been. All the other factors (internet, Amazon, etc.) helped increase the rate of growth but the fact that there was growth year after year in the first place? That's because of the rules.