Water can leak out past the spindle glands, oil can not leak in
What's the point of using it then if the oil can't get to the internals, that can be where the tap invariably seizes up. If it's just the gland then loosening the gland nut will free that up to allow it to turn again. Invariably though an old stop tap will seize up further down the spindle and into the tap internals or the internal head gear thread is worn and it's jammed. When WD40 is used, it acts as a penetrating lubricant and can work it's way down into the tap internals.
I've serviced taps in the past where WD40 was used to free it up and it's worked it's way down, broken down the original grease inside the head gear and could be tasted in the drinking water. Thats why I never recommend ever using a penetrating oil and why a stop tap really needs broken apart and the internal machine threads re-greased (silicone), amongst other things, for it to be serviced properly.
Sometimes the physics don't marry up with the real time experiences