One of my teammates posed this question today. I had to think about it for a while, and here is the answer I gave him:
My reasons for racing vary. When I was young, it was because I was phasing out of speedskating and into cycling. Breaking Away had piqued my interest, and considering I was 5'7" and 115 lbs soaking wet, cycling seemed to be a natural fit. I also knew a few guys that raced, and that further fueled the desire.
As time progressed, it was the cool factor. There weren't that many cyclists. The sensations and competition kept it interesting. It was a moving chess game. I had periods where I was winning races, and periods where I could not finish a race to save my life. The wins kept me going, because I knew I could do it again.
Cycling was also one of the few sports where you could compete against the pros. Imagine playing tennis with Andre Agassi. The chances of that were very rare. But I have raced with a lot of famous pros. I've had my ass kicked by some of the best cyclists in the world. Just being in a race with a couple of these guys, watching them turn the pedals just like you do, suffer just like you do is priceless.
Later in life it was the search for the perfect race, one in which I did everything I could regardless of outcome. It's a great analog to the perfect hole in golf where you were par or below par. It's hard to achieve. Sometimes it takes more than one year to get there. When you finally do, it is a wonderful feeling.
Sometimes it's because nothing else in life is going right. Work sucks, you're boss is kicking your ass, your girlfriend broke up with you, your dog died. Sometimes the small act of finishing a race is all you need to feel worthy.
Sometimes it's because your doctor has told you "You're to asthmatic to ever run with the pack." Well, doc, I have to say I did. Other times it's because the doctor says your racing days are over. Doc, I'm not so sure about that.
Other times it's simply because you can. Others can't or won't. You're racing for them, to show them that if you can race, they can get off the couch and walk to the kitchen, despite being so weak every step is an effort.
Sometimes you race because you don't know what else to do. Sometimes it's because you enjoy it, other times it's because you need to prove it to yourself you can do it.
Sometimes, you rationalize this stuff before every race, every lap, every minute. It's a minute by minute thing. Sometimes the angel on your shoulder gets you through, and sometimes the devil on the other shoulder convinces you to drop out, to be a loser.
Sometimes it just sucks, but once you get that little glimpse, that par hole, that good race, or even that good lap, it's a wonderful moment!