WD-40 is versatile stuff. Invented in 1953, it was developed for the aerospace industry by the appropriately named Rocket Chemical Company in San Diego, CA. The "WD" stands for "water dispersant" and the "40" presumably indicates the 40th development attempt. It was first made available to the San Diego consumer market in 1958 and the rest, as they say, is history. An interesting side note is that the inventors never patented the formula, allowing it to be kept as a trade secret, which it is to this day.
WD-40 is also a lubricant, though a low viscosity one. After application the thinning agent evaporates leaving behind a very thin film of oil which protects from moisture, and thus corrosion. Its lubricating qualities are for very light-duty applications, like throttle linkages or zippers. WD-40 can be used as a parts loosener in a jam (no pun intended) and, of course, it displaces moisture, like on water-soaked ignition wires.
There are more job-specific chemicals available, but the attraction of WD-40 is its versatility, making it useable for many tasks. Here, I'm using it as an adhesive remover, scraping with a plastic-bladed razor. I also use it as a general, gentle degreaser, and for removing chain grease on the rear wheel and anywhere else that stuff goes. It will remove light surface rust and could be used as an electrical contact treatment, but I tend to use di-electric grease for that job.
I will always have a can or two within reach.