Which all kind of leads to an interesting question. What playstyle is 5E designed for?
The early TSR versions and editions were all about the dungeoncrawl and wilderness exploration. XP for gold, not killing monsters. Low hit points. Combat was deadly. Death was laughably common. Resource management. So they pushed smart play, avoiding combat, interacting with the environment, etc.
2E shifted a bit to more story-focused play. The Player's Option series brought in builds and power gaming. Resource management was still a thing.
3E embraced builds and power gaming and system mastery. It ended up in rocket-tag land. Numbers went up and healing was easier. Resource management was still a thing, after a fashion.
4E was all about combat, almost to the complete exclusion of non-combat. Numbers went up and healing was easier. Resource management was practically gone as it only had two categories: encounter or daily. You got encounter resources back after a 5-minute rest and daily resources back after a 6-8 hour rest. And practically everything else was shoved into skill challenges. As much as I love skill challenges, they were not the panacea the designers thought they were.
5E is often described as a throw-back to 2E. Numbers went up (though a few went down) and healing is easier. Death is rare. Resource management is all-but gone as most resources are trivial to replenish.
So 5E isn't a dungeoncrawl game. It's not an overland travel game. It's not a resource management game. You only get XP for killing monsters per RAW. The game rewards killing monsters...but fights are trivially easy per RAW...unless the DM puts a heavy thumb on the scale...so it's not a combat game. It's smooth and easy to pick up and use, mostly. But it doesn't push a single playstyle...while actively discouraging or making certain playstyles impossible or pointless.
Well, the design
intent of all editions of the game has always been twofold: make it fun, and make it sell. The trouble is that both of those things change over time. To keep hitting those marks, the game had to change...which meant new editions were written. But yep, you make excellent points.
When 2E was being written, the game was much more story-focused as you said. But there was enough demand from the customer base for more structured rules and such, so 2E ended up with a much more "mechanical" feel than the earlier versions. If only to distance it from the "Basic D&D" product line that was becoming less popular.
3E was written by the authors of Magic: the Gathering, so it wasn't any surprise that the game was written to appeal to the M:tG player base: lots of math, lots of standardized rules mechanics, lots of build strategy (or "system mastery," as you put it.) Magic: the Gathering was invented by a math teacher, after all. But I digress: at the time 3E was written, it was the kind of game that was considered fun, and the kind of game that people were buying: lots of crunch, not much fluff.
When 4E was written, the kinds of games that were considered fun and marketable were Everquest, World of Warcraft, and other big-budget MMORPGs. So to capture that demand (and sales), the next edition of the game focused on team-building, synergy between classes, per-encounter actions, and similar mechanics from popular games at the time. Apparently this is a bad thing, because every time I bring this up I get yelled at. But I insist that it was not only a good thing, it was the right call at the time. WotC had no way of knowing that the MMORPGs were about to fall out of fashion.
But they did. Times change, and when 5E was being written the shift had started moving back to story-based, "classic" D&D. Retro-clones were all the rage at the tabletop, and on screens people weren't playing MMORPGs as much...instead, they were playing more lore-rich games like Skyrim and Final Fantasy XII. So it's no big surprise that 5E shifted to a more lore-rich, rules-flexible format.