This is the sort of burning question that lots of people wonder about for some reason... I guess if you use the stuff all the time it bugs you after a while!
To solve the mystery, the best place to go is the WD-40 Web site at http://www.wd40.com. This is actually a pretty neat site! If you dig around a little, you find the following fascinating quote:
WD-40 literally stands for Water Displacement, 40th attempt. That's the name straight out of the lab book used by the chemist who developed WD-40 back in 1953. The chemist, Norm Larsen, was attempting to concoct a formula to prevent corrosion -- a task which is done by displacing water. Norm's persistence paid off when he perfected the formula on his 40th try.
Now don't you feel better knowing that?
Here are some interesting links: