This matches my experience 100%. I am not a brilliant developer by any measure. I'm competent enough, I can put together good solutions to the admittedly low-scale problems I'm assigned, and I like to think I have a pretty good sense for the right and wrong ways of going about doing so. But I'm not even sure I could land an interview with a FAANG company, let alone a job.
My feeling at work is one of constant vigilance. I feel like if I look away for too long the gremlins will start creeping in. And I'm not talking about some imperfect design or the odd code smell, I'm talking about dropping in on a PR two senior engineers have already approved and spotting a critical security flaw in the first 30 seconds. Or a data loading pattern that works okay with the five records they've tested against but would make 300 database queries per page for a realistic dataset. Or spend 75% of their CPU time hydrating date objects from timestamps that are then immediately discarded.
I think it comes down to a lack of inherent curiosity and/or interest and/or passion in programming. To me good programming is a craft—I won't go so far as to say it's as much art as it is science, but I think there is definitely an artistic element to it. Which for me introduces a need to do something well, rather than just ticking boxes and going home. "Painting the back of the cabinet", as it were. If business requirements force me to ship some monkey-patch fix, it gives me a discomfort I can't really put into words. I immediately want to replace it with something better, because I just don't like putting work I know to be substandard out in the world. I'm not even particularly invested in the product and services my employer creates, but if it's my work I want it to be good.
Something I often hear is "I couldn't work out how to make <solution we all know to be good> work so I just did <sloppy solution that will need workarounds five seconds after clients start using it>". It irks to me to no end because without fail, what "I couldn't work it out" always means is "the first thing I tried threw up a minor roadblock so I stopped trying". And it sucks because the worse a codebase gets, the more difficult it is to contribute something you can be proud of.
Have I just had the misfortune of working at particularly crappy companies, or are things really this bad across the whole industry? I'd really like to think it's the former, but I read articles like this and dread that it's the latter.