I knew a guy, his construction company built half of Lake Tahoe back in the day. When he retired he built himself a work shop in the basement and made furniture until the day he died. It's incredible furniture. I'm sitting at one of his desks, on one of his chairs. 40 years old and still in excellent condition, and beautiful! Helical legs. You cannot buy furniture like this in the store. Handmade by a master craftsman at the height of his skill and knowledge. Made solely for the love of the craft and the joy of giving gifts.
That kind of person has fun working.
Computer programming IS fun to the kind of person who enjoys computer programming. Those people can do what they like.
The rest of us want "boring" software: machines that get the job done, that don't break, that don't spew private data into the cloud willy-nilly, etc.
If making that kind of software isn't intrinsically fun for you then maybe don't be a computer programmer? (We made a huge mistake making the normals think that learning a bit of JS was a viable career path.)
Industrial software shouldn't be fun (except of course to the people who already find it fun to deliver solid working software!)
- - - -
In re: bugs being fun little learning opportunities...
Margaret Hamilton worked out how to write bug-free software during the Apollo 11 project. The IT industry collectively went, "meh."
We need a serious attitude adjustment.