I understand your point, and I don't disagree with it as a matter of utility. It just doesn't capture all of what code is.
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.