If you support the 10K hours argument, some things are willingly done and others less so. I make coin with programming, yet people pay to see guitarists.
But obviously some guitar practice is more involved. It's something I think about a lot actually, as when I need a break from programming first thing I do is pick up my guitar. My musical goal is to be able to improvise on the guitar using jazz theory. To do that you need to internalize abstractions like scales/modes and chord progressions. You need to be able to transpose the same abstraction/pattern to different notes (on the most basic level this would just mean sliding further up the neck and using the same shape for fingering), and you need to be able to 'search' your options (some chords can substitute for other chords, which might then allow a whole new path of music) on the fly.
In programming you don't need to wrangle all these abstractions in a strictly timed performance, and there's no physical component to the challenge. But still, I often think about the similarities. I guess playing jazz guitar, while complex, can still be kept within a manageable scope of permutations and ultimately 'mastered'. But with programming you can't tame the complexity, you just get good at dodging it.
I get better at programming as I do it more. I think you're correct that individual knowledge points aren't "practice" per se, but practice definitely factors into skill over time. Just like I imagine it does with the guitar.