I am not so much a programmer, more project manager, but programming is great fun, when it is your own, but other people's demands can be oppressive. Also, thinking back, it was more fun when I was a consultant, when the work was focused on single projects and deliverables, but as an employee, there is often little end to the work. Managing and leading can be fun, and there are pressures, but I imagine at some point this can also become oppressive. Looking back, I was most happy when my work was relaxed, giving me the freedom to learn and experiment. If my work is focused on existing process and systems, I am not as happy as I could be.
FYI, my side work and learning is focused on AI and ML, as well as diving into complexity and systems, which can be very intellectually engaging, but it is on my own schedule.