I see this on a regular basis and it is really a simple repair for a professional roofer. The PVC pipe that comes out of your roof is a plumbing vent. This vent allows air into the plumbing system allowing for operation. This is a simple process. The issue arises with the PVC ‘boot’ that is installed around the piping. These boots over time can and do crack and warp. While these can leak-usually the leak can go undetected for quite a while due to the small size of the water intrusion.
When you see a small stain on the ceiling and wonder why- this is probably your cause. A professional roofer can make this repair (replace the boot) very easily and quickly. Look up at your roof from time to time, you may save yourself some trouble.