I did not see the question in terms of the legal issues, who is responsible to pay when faults is found. The question revolves around feeling good about the work and taking pride in producing something of long term value.
The body can produce three stress hormones in any given situation, endorphins, adrenaline, and cortisol. Endorphins produce feelings of euphoria, runner's high. Adrenaline is referred to as a "rush", there are adrenaline junkies. Cortisol is the bad stress hormone. It is produced when the body is telling you to stop and rest so the body can repair injury and avoid repeating the cause of the cortisol response. It's an inflammatory reaction, bad for the body, and long term too much can shorten the lifetime. Endorphins and adrenaline, people cannot get enough of, and will do whatever it takes to maintain and experience the feeling of highs, including working to exhaustion. People want to avoid the feelings of being low.
Hard work when things are going good and professional quality, artwork, is being produced gets the adrenaline flowing and the pro worker feels good. I can tell you feeling good about my work is part of my pay package, compensation. Come along and try to play some game to make me feel bad about my work, give me a cortisol response instead of adrenaline or endorphins, and I will feel personally cheated. I do not work to get paid in cortisol. Pay me with adrenaline, endorphins. Let me work and take pride in what I do and do not get in the way.
I would love to cast this post in terms of entropy instead of stress hormones. Maybe another time.
Point is more work gets done better when the worker has a good stress response, adrenaline, endorphiins, than when a cortisol response is provoked. Coming along and telling a guy to damage "his" productive capacity by intentionally underperforming to code, because there's a nickel to stuff in the pocket, and you are asking for overall lower levels of production, as the worker gets cortisol for his reward.
Throwing bad quality work up on the wall or throwing good quality material into the river should have the same personal response, cortisol. The body tells you something is wrong, to stop, rest, repair the damage. The real problem comes from guys who are incorrigible, completely clueless and faking it, have no remorse. They can cheat code regularly, if they even know any code, produce bad work quickly, throw good product in the dumpster, and the activity causes adrenaline or endorphin rush. Combined with glibness, and something else, those are the tells of the pathological personality. The person who enjoys bringing and causing harm to others. This is very widespread in the population, you cannot walk down the street without someone trying to do you in.