IMO I've often seen extreeme scenarios and then a reactionary 180 swing to the other extreeme, it's usefull to recognise that both approaches are extreemes.
It might be obvious to you but I constantly see devs that fail to recognise sales focus has value - like we need to ship feature X by Y to get client Z otherwise the opportunity is gone. I'd say 2/3 devs I've worked with will immediatly push back with concerns such as long term maintainability, scalability, etc. None of those would be a blocker for the sale or the initial customer, and once you land the customer you'll have the budget to go back and fix it - but yeah still a deathmatch to get those through sprint planning.
And queue jaded devs here claming "they do it because they know once it's commited it will never get fixed", honestly whenever I come up with actual problems and solutions I can't remember being turned down (deffered a couple of times, still got to do it eventually) - I've worked for 2 startups, and 4 enterprise teams.
So if you're not getting space to do this kind of improvements and care about code quality - maybe consider changing your workplace.