I can't see anything wrong with using WD40 to clean your chain.
Open chain and sprocket with a highly variable load in unpredictable conditions - from dry to wet, hot to cold, sandy to mud - is pretty severe service for a lubricant to begin with, right?
WD40 is formulated from a reasonably benign light non-polar (oil-based) solvent and light oil and some additives, so it will dissolve most oil-soluble organic grime, and physically carry away any inorganic/water soluble grime. And shove water out of it's way - hence the WD part of the name, I'm sure you all know it stands for "Water Displacement".
The vast majority of the liquid is solvent, just a carrier for the tiny bit of actual ingredients to dissolved in, and carried to where they will be deposited when the solvent evaporates.
The actual oil in it has very low lubricity, almost no 'pressure' resistance - it will just press out from between surfaces that come into contact with much pressure between them - like the tooth on a sprocket and a roller on a chain.
Most of the oil in it has a very low evaporation point, so it's not going to hang around on your chain very long. Spray some on a piece of shiny aluminum and set it out in the sun for a bit, and see what remains... a thin film - and I mean molecules-thick - will remain. This is a bit of additive film, some surfactant to help spread out the corrosion inhibitors, which are mostly nitrosamines. And tiny bit of light oil and 'wax'.
So, be aware of what you are using, and what it's actually doing.
Do I use it? Ya, to clean the gunk off my chain. I use a spray bottle of it, not the aerosol can, I don't want to pressure-blast anything in between the o-rings. Then I brush off the chain, and wipe everything off with a rag.
I use fresh 10W-30 motor oil to lightly oil the chain after it's clean. It's got a good pressure and adherence rating, good enough for a timing chain, so it's good enough for me. Then I wipe most of that off, too, after an hour or so. There are additives in motor oil that give the oil 'creep', so it will spread out and cover surfaces better if you give it some time.
I'm not hard on the chain, and where I ride, it's pretty clean. More severe service might require a different regimen.
(Now that I think about it - I may try mixing some 10W-30 motor oil in with some WD40 - maybe 50/50 mix - and using that on the chain after I clean it with straight WD. The solvent in the WD will help carry the motor oil, and penetrate and cover better than just the motor oil alone. The additive packages look to be compatible. Can't hurt.)