“When you’re a carpenter making a beautiful chest of drawers, you’re not going to use a piece of plywood on the back, even though it faces the wall and nobody will ever see it. You’ll know it’s there, so you’re going to use a beautiful piece of wood on the back. For you to sleep well at night, the aesthetic, the quality, has to be carried all the way through.”
I think software as a whole suffers greatly from this "well, I got it barely done, technically fulfilling the requirements, so my work is over" attitude.
1: https://www.goodreads.com/quotes/445621-when-you-re-a-carpen...
Also, think longer-term: if you can program well enough, then you can write great software quickly which is a huge asset when making your own thing and selling it.
It is quite rational to optimize for your own wellbeing in these ways even in orgs that are not fully conducive to long term careers.
No? Doing things the right, robust way regularly takes more time and effort than doing it the quick and dirty way, which means your lazy coworker gets the management attention and raise instead of you.
For the vast majority of software developers, the correct career choice is just to always be making your manager's life easier, and they rarely care about "doing things the right way", especially when whatever you write will be replaced in five years because someone somewhere is too lazy to understand the current codebase.
Life is too short to spend most of your waking hours surrounded by people whose beliefs go against yours.