Maybe psychology is a very important factor.
Do you have a job? Why do you go to work? For many, it's a means to an end and an onerous chore, but some (OK, maybe a few) also find enjoyment and fulfillment in their work. Maybe that's an analogy to hill climbing.
I realized a change in attitude toward hills when I hiked the Appalachian Trail. That's very hilly terrain, and equivalent to climbing Mt Everest from sea level six times in a bit over three months (minus the altitude difficulties of course). Toward the end of that hike, I realized the hills no longer bothered me in the least. It wasn't that I enjoyed the summits any more, and didn't actually enjoy the climbs, it was just a subtle shift in the way I saw walking up hill--it was just something I did, a part of every day. After that hike, I felt the same on the bike. I cycled the Northern Tier route across the US, which starts and ends in mountainous terrain, and the hill climbing never bothered me a bit.
There's a saying I heard long ago, that rookie cyclists complain about the hills, while experienced cyclists complain about the wind. That's certainly not universally true, as Machka (a frequent poster here) can attest.
All that said, I think one of the worst-case scenarios on a bike is climbing a long grade, in the sun, with a tail wind going your speed. That feels like sitting in an oven and there's just no way to enjoy that!