It’s called Airmanship and seems to be a bit of a forgotten cause these days.
So it's not just me who has noticed this lamentable trend.....
It's absolutely true you can be whiter than white legal, while flying very unwisely. Conversely you can do stuff which is entirely safe, but not legal.
I'm grateful for the wise pelicans (OK, there were a couple of hours builders in there as well but the wisdom of the WPs drowned them out) who taught me Airmanship if it can be taught (I think it can if the stude is receptive). These WPs are still around, but perhaps much less common than in the 1970s when I did the PPL. They are worth seeking out.
Beyond the PPL, you learn through experience what kills pilots and what doesn't. You see over the decades who has the 'incidents' and who doesn't. What's legal isn't always the measure (though of course, often it is as air law is modified by a desire to reduce accidents).
So stay legal, but THINK!