How does that work within the context of an office place? Not all corporations have internal cultures that encourage competition between coworkers. And at some point it's no longer productivity that causes one to get ahead, but politics.
Thats why I've enjoyed working for the government for the past couple decades. I'm pretty confident that a good chunk of the code I write will never make it to production.
As an aside, wouldn't you enjoy some degree of pride if you could claim otherwise? Like "every licence plate number in Kentucky is generated by an algorithm I wrote" or some such?
If you can be confident that you can coast your whole life and be well-off, then I have no argument against it.
If you are not confident, or perhaps want to make sure your children have a work ethic that is more likely to give them a good life - then it's a big risk to assume you can chill and all will be fine.
The OP isn't coasting, it's about not maximizing productivity for the sake of it. It's about striking the right balance, avoiding burnout, working smarter not harder. Too often productivity becomes a cargo cult of austere asceticism rather than something that actually enriches one's life. Some days it's okay to work-to-rule.