Maybe to you. For some of us, it's also a form of self-expression, a hobby or a lifestyle.
In my experience coding for money and coding for fun is a very different experience. I know my worth, but I am also free to do whatever I want out of my working hours.
I find computer systems beautiful. A system of parts interacting in a complex dance to process data. Each part effortlessly modifyable and reusable, executable by the generic machine people already own.
I love the puzzle of putting data together, of shaping it in main memory, and the joy of finding that previous shaping makes the current problem easier. The joy of finding a hidden algebra or transitivity.
All of these things go beyond the "tool" view of software and touches the "art" view. A painter doesn't find the painting useful, they find it beautiful.
I would be writing software, even if I want paid. I would however be working on vastly different software, and I think that's the OP's point.
Coding is a tool to solve data problems, I've been doing it for close to two decades now and I still find it fulfilling and fun. Many years ago I used to think, I love my job that I would do my job for free ... I was wrong! Others will paid for doing things you find fun, make sure you know your worth.