The thing about mastering is that unless you're a part of the production team and get to hear the before/after you'll almost never know what the mastering engineer's contribution actually was. Done well, their role is invisible.
Mastering engineers work with the record that they receive from the mixer. It's entirely possible that the smashed (over-limited) record was handed to them by the mixer and approved by the artist. In that case the ME's hands are usually tied. They work with what they receive.
Likewise, the mixer may receive a reference mix (from the producer) that is smashed. The mixer has far more ability to influence the sonics than the ME (waaay more), but they too can have their hands tied if the artist is really attached to the vibe of that rough producer mix.
Professional mixers and ME's are well aware of the negative effects of the loudness wars. It's well understood by any working professional today. Ultimately the buck stops with the record's producer and the artist. They're the ones seeing the project through from beginning to end.
The difference falls on them, between a "loud" record that sounds like lifeless trash and a "loud" record crafted with skill, taste, and intention that has depth and impact. As I said, amazing "loud" records do exist when all stages of the record's production team are aligned. But it requires restraint and taste on the production team and the artist.
---
You're not wrong that something changed around the mid 90s. Until the late 80s records were being mixed primarily for vinyl. The limitations of the medium (namely the needle would skip out of the groove if you tried to print a loud or bass-y mix) kept the loudness in check. You simply COULDN'T make a record that loud. This limitation acted like speed bumps. But perceptual loudness has always been an objective of recording engineers since the dawn of recording.
What happened is that in the 90's digital tools (particularly digital limiting) in combination with digital playback mediums (CDs) opened up the door to squeeze greater loudness and new sonic aesthetics out of records. As such, these tools have been abused and over-cooked. In some cases that abuse may be the objective.
Today we're well aware of the trade-offs and to some artists it just doesn't matter. They WANT it smashed. It ultimately comes down to restraint, taste, and good technical know-how to get a flavor of loudness that doesn't have too many tradeoffs.