The reason I've left companies in the past are because they were too busy building features that they didn't focus on robustness of the software. So engineers ended up slogging beyond work hours, finding and fixing bugs. Unfortunately this is true even for big-tech companies. Secondly, there's micromanagement done in the name of scrum. Like you mentioned the need for considering the scope and requirements, engineers need a certain amount of breathing space to plan and design the architecture to be flexible. It also helps to have mentors capable of taking engineers to the next level. Most of all, it helps to eliminate the drudgery of repetitive tasks (https://medium.com/@nav9/when-can-we-use-spoken-english-as-a-programming-language-8aa30f2e009c). Funny thing is, I've known managers and CEO's who once were engineers. They know what needs to be done. They try. But the pressures of being competitive in the world of business seem to make them cut corners. So this appears to be a broader problem that needs to be addressed by governments. To provide a healthy environment for competition, where companies are allowed to build robust products without the fear of engineers leaving for higher salaries or without the fear of losing customers to a competitor.