Graeber states that more than half of societal work is pointless, both large parts of some jobs and five types of entirely pointless jobs:
Flunkies, who serve to make their superiors feel important, e.g., receptionists, administrative assistants, door attendants, store greeters;
Goons, who act to harm or deceive others on behalf of their employer, or to prevent other goons from doing so, e.g., lobbyists, corporate lawyers, telemarketers, public relations specialists;
Duct tapers, who temporarily fix problems that could be fixed permanently, e.g., programmers repairing shoddy code, airline desk staff who calm passengers with lost luggage;
Box tickers, who create the appearance that something useful is being done when it is not, e.g., survey administrators, in-house magazine journalists, corporate compliance officers, academic administration;[14]
Taskmasters, who create extra work for those who do not need it, e.g., middle management, leadership professionals.[1][4]
The cognitive ceiling. Research by Ericsson, Mark, and Newport shows that 3-4 hours is the daily maximum for concentrated effort. Beyond that, diminishing returns.
"Diminishing returns" is not the same as zero returns. You'll get more coding done if you work eight hours a day than four hours a day. There's certainly a point where the quality gets so low that the returns are negative (by introducing bugs / technical debt / stuff you have to rewrite the next day), but in my experience 4 hours is not it.
In fact, if the problem is very complicated then it might even take you three hours just to get up to speed with what you were doing the day before.
https://en.wikipedia.org/wiki/Bullshit_Jobs