Being ans programmer is 5% writing new code and 95% maintenance and adding features. When you have nice code those 95% can be fun because it shows you how good your original architecture really was in terms of adaptability and how well you can understand what it does years later.
When the written code is shit adding features and maintenance will make it even shittier and shittier until someone has to rewrite it properly against. Which might be at that point a too large investment for the managers which means you have to keep the shitty codebase and you as a programmer turn into someone that has to shovel shit all day.
Bubblegum programmers that can survive by copy past stack overflow and chat-gpt will never get the really well paying jobs.