The water gets there from the middle ear tissues.
How?
Gaseous diffusion into the middle ear tissues slowly absorbs the nitrogen and oxygen from the middle ear space in everyone. This absorption has to be replaced by equalizing periodically, which is what happens to all of us when we yawn or swallow and we feel our ears"pop."
When the Eustachian tube doesn't allow equalization, a partial vacuum is formed in the middle ear space, and fluid is physically drawn from the moist mucous membranes in the middle ear space
and can fill the middle ear with fluid.. Not water from outside, but the body's own tissue fluid. This can happen whether you're diving or not.
It's more likely among divers, because the degree of pressure difference (relative vacuum) can be much higher more rapidly when diving.
A second, but much less likely source is fluid reflux into an abnormally patent eustachian tube from "snot" in the back of the pharynx when one equalizes. This has been shown to happen in some infants with middle ear fluid and frequent ear infections but is felt to be very uncommon in adults if it happens at all.
Fluid in the ears of divers can occur when diving with helmets or full face masks or in compression chamber operators, so it doesn't depend on water from outside the body.
This can happen with a degree of equalization that is incomplete, but painless. (It takes a fair amount of vacuum in the middle ear before the tympanic membrane is stretched enough to hurt. ) hence the admonition to equalize early, before your ear hurts.
This is a long and technical explanation to a common problem, but there's no other way I know of to explain what seems like a bizarre body process, but is actually based on physics and physiology and backed up by studies..
Dive safe and equalize early.. keep the bubbles in the water and not your bloodstream.
John