When are programmers happy? They're happy when they're not underutilized - when they're not bored - and also when they're not overburdened with inappropriate specifications or meaningless bureaucracies. In other words, programmers are happiest when they're working efficiently. This is a general preference in creative work.
People are happiest when they're the most productive. People enjoy tasks, especially creative tasks, when the tasks are in the optimal-challenge zone: not too hard and not too easy. To some extent, that has always been true. But it becomes even more true as work becomes more about brains and creativity.