My bathroom's fan vents through the ceiling, with a unit like this one:
We had some water dripping into the ceiling. I found all the shingles and roof looked good, but the box had a lot of leaf litter in it. No telling if it was birds or just accumulated 15 years of sitting there, but I cleaned it all up, verified that the flap was in good working order and was clean. I cleaned and replaced the screen that should have kept that stuff out.
Then I went into the attic and verified that the outside surfaces of the roof vent was dry and it was only the inside that was wet. Again, I cleaned it all out - lots of evidence that leaf litter had found its way into the housing and down into the vent pipe. All the building materials looked first rate, no faults or corrosion, no reason to complain about the installation.
I put it all back together again. After some reading, I found that I should add insulation to the pipe, but I don't want to do that until I'm sure I won't be taking it apart again. So I waited for a rainy day when nobody took a shower and returned to the scene.
But alas, the inside of the pipes were damp, with a couple of stray drops of water. Again, no moisture outside of the vent, except for a drop hanging from the bottom that snuck out a joint. The insulation underneath it didn't look damp. Yeah, it was wet, but not like before I cleaned it up.
I then dried it thoroughly with a paper towel, waited a couple hours, and went back up there. Sure enough, moist again. All the way around top of the vent, not focused in one area. Again, the cap operated freely, no problem with the mechanics.
Note that I live in the Pacific Northwest. Wind isn't a thing here, but rain sure is.
At this point I want to believe it's some kind of condensation - house air making its way up to the cold metal. Sure, I could insulate the pipe, but it's metal, and it's directly connected to the vent cap, which is on the roof. That metal is going to get cold, insulation or no. If it's a case of warm house air making its way up there and condensing, well, I don't know what can be done about that.
I suppose I could go ahead and wrap some insulation around the pipes, but I don't want to make a maintenance hassle for myself if I'm going to be repeating the ritual.