Cyclists don't necessarily know why they shave their legs - the origins are apparently lost to the mists of time, or at least to the turn of the 19th Century to the 20th Century, when European racers apparently started the trend.
I think the real reason is this: shaving shows off the muscles, sculpted with much effort over a long period of time, that prove the commitment to cycling.
It's the same for body builders, too. They shave more of themselves than cyclists do, because they show off a lot more skin.