Nothing wrong with WD40 just not suited for rust penetration.
Yup, that's it. It has its uses in removing water, and to some extent in temporary corrosion prevention.
But it's lousy at penetrating crevices, and even worse as a lubricant. If you evaporate off the carrier solvent, the residue is a sticky brown gum...