I believe it goes deeper than the rush of endorphins that are released by exercise; there's the addtional stimulation afforded by the more aesthetic aspects of cycling (or walking, running, skiing) where you get to enjoy the fresh air and the daylight, the exhilaration of the wind and weather and the challenge of pitting yourself against Nature. My favourite kind of cycling, either road or mountain bike, is the day out when I'm self-sufficient in big country with only a well-maintained bike and a small toolkit. It's never happened but I'd imagine that, faced with a really disabling mechanical, the stranded cyclist must feel like I did when I lost a ski in deep powder on top of an Alp - suddenly you realise you're stuck, let down by the mechanicals.
But it goes even further: over several decades of trudging and cycling around mountainous areas I've come to the conclusion that humans have a deep-seated anthropological need to beat the boundaries of their territory. You only have to watch a bunch of mountain bikers setting off on a ride to see what I mean: popping wheelies, showing off, laughing and joking, full of confidence.... I've sometimes been struck by the similarity between a bunch of cyclists and a pack of hounds, racing around, "owning" everything and marking their territory. In the same way that golf is supposed to be the modern prey-chasing game, I think cycling is the modern territory-patrolling game. Both answer a deep-rooted need that we don't even know exists.