Maybe great coders like it so much because they are good at it. It would be reasonable from an evolutionary point of view to focus on what we are better than others at. At university I have seen people get into a field on the basis of an unexpected excellent grade and conclude they love it, and reject whole fields as stupid and uninteresting after failing - where the directly of causality is clearly result first and love/hate second.
I think there's more to it than that. When I first started writing code it was pretty clear that I was not very good at it (at the time), but absolutely loved it anyway. Man, the rush of power when you realize you can get the computer to obey you... that's what got me hooked.
This feeds into the myth of passion equating talent/skill, which has been incorrect in my (admittedly short) experience. I can think of more than a few athletes who had no passion for the game but were phenomenal players.
that said, it's also very possible that I'm not a great coder
"Talent is a pursued interest. Anything that you're willing to practice, you can do." - Bob Ross
But it doesn't mean that anybody can achieve anything. Just that one can become a master in a field in which he's happy to put these 10K hours.
I'm yet to meet a great coder who wouldn't enjoy coding.