Thinner oils like wd40 don't stay long enough in the chain.
besides, the chain needs thicker products, like wax or grease.
wd40 does not lubricate enough, because it's too thin.
The higher the force, the thicker the grease needs to be.
An engine needs oil, because it generally has high movement, low forces (and in need of high coolant).
A transmission needs oil for low movement, high forces, and low coolant.
that's why an engine gets 10w30, and a transmission gets 80w120 oil.
A chain has very low movement, and the contact points are very small (pins), thus has extremely high forces worked on it, and needs very low cooling, as the travel distance through the air from front to back, or reverse, is enough to cool it, thus needs a thick lubrication substance.
Aside from wax providing superior lubrication for a chain, it also is dust repellent, compared to wd40 is dust collecting.
Silicon and carbon (as in sand and exhaust) are chain killers.
Silicon does not equal silicone!
silicon is sand or quartz, and in this case can be dust from rocks or stones; and silicone is an oil based gel with nothing of the hardness of silicon.
Some of the dust collected is harder than steel, and causes excessive wear on the links.
WD40 collects all that on your chain.
Iso wax spray cans have the wax (usually lithium wax or grease) mixed in a thin oil, that washes away dirt, and at the same time leaves a light trail of wax on the chain.
the oil also helps getting the wax between the o-rings.
I use chain wax, and only need to wax the chain once every 2 months.
Wax, when dry, feels like plastic, isn't sticky, but when rubbed between two surfaces, feels more like hard butter.
my bike is outside in extreme temperatures, unprotected, 90+ degrees sun, and rain.
people who leave their bikes inside, should wax their chains every 3k to 5000 miles.