Probably because one is achievable and you know more or less how much you've got to go and the other is pretty abstract.
Maybe also the fact that one ends pretty soon (not to mention you can stop at any time) and the other goes on for way longer (and maybe you can't stop it).
Which is to say... if I wanted to be the #1 code all the time coder in the world, I would not want to be training for an Ironman or something that required 15 hours of fairly high physical stress a week.
Or if I wanted to train for an Ironman, I would not also work for a startup with my hair on fire all the time.
Clearly some people do both. Investment bankers love triathlon in fact. It seems to have negative physical effects after a while though... something has to give..
At least I get to fly after that :) ... unless the weather changes
But intense physical exertion _is_ stress, so this approach can backfire when your stress load is too high.