5 years ago there was a lot of talk about how D&D might be dead.
Now the talk is 'of course it's doing very well, it's D&D'.
In that timeframe, D&D's main competition (and the only one that ever overtook it within the marketspace, as far as we can tell) was essentially a clone(PF).
If the edition wars nearly broke or killed D&D, it was because they broke the network externalities that (usually) keep it on top of the market. When a new entrant into the market couldn't figure out what game to pick up (4e, 3e, Pathfinder or whatever else was on the shelf) it adds a cost of entry that can turn them away. My son even experienced that, he had friends playing each of the three, and they couldn't come together on a system. (Not for all the edition war reasons, they were just trying to goof off and learning three versions of the game was just not worth it for them.)
We are at peak RPG right now. Most of the people playing all RPGs (incl. 5e) are not hobby gamers and started playing with 5e.
The 'find a group to play in' is true of hobby gamers looking for an RPG.
5e has caught on among non-hobby gamers because they like it. They could be playing board games or doing other things. They're playing an RPG because the RPG is good.
Or because of a lot of other reasons like: other ttrpgs aren't as easily available, you can't find groups to actually play those other rpgs, plain old brand recognition, production value, etc.
None of which directly addresses why we are seeing the surge in ttrpg play (and/or sales) in general, and I'm not making any particular argument as to why that is going on. I don't believe we actually have access to enough data to discount or support any of the theories I've seen put forth in that regard. (Its a post-eurogame effect, kids are craving actual face-to-face interaction, 5E is just that awesome, the rise of streaming live play, modern helicopter parents like it, celebrities "coming out" as D&D players, and a host of lesser and sometimes crackpot-ish theories as well. Heck, it could be some weird confluence of any number of them.)
What you prefer in a game is what you prefer, but to call 5e mediocre is absurd.
Amongst the various D&D's, I actually think 5e is superb. However, its not exactly bleeding-edge ttrpg mechanics, nor is it perfect or complete in all respects (witness the zillion or so arguments and "how do I do X?" threads on this very site). D&D is a product that relies heavily on Network Externalities to maintain its market share. One of the (rather obvious) design goals of this edition was to create an easily adoptable version of the game in order to capitalize on (
and fix the edition-war torn) network of the game. I mean, that's why (from a marketing point of view) they were motivated to appeal to players of all editions, and I think they succeeded. Sure, they wrapped it up in all kinds of (at times smarmy) language about healing the community, but if that network had stayed broken....I think we'd be looking at whole different ballgame.