I was the OIC of an Army Pistol Team. If my CSM ever saw me using WD-40 he'd tar and feather me. I have used Brake Cleaner (same thing as carb cleaner) to great advantage once I learned it will just disintergrate anything in the way of plastic mags. The army would never sanction WD-40 in any official sense. Most of the stuff we learn comes in the form of sage advice from the old hands, right? Sometimes sage advice is more urban legend.
It sprays or wipes on, then dries to a lubricating film that doesn't attract dust.
I wouldn't spray it on my ammo as there's a chance it MIGHT screw up the primers.
It dries fairly quickly on the gun, so won't seep into the ammo if you wait a few minutes to load.
You can feel the action in a revolver is smoother after using it.
I learned it will just disintergrate anything in the way of plastic mags.