
1st of all, it is allowing moisture into the attic. Attics need to breathe and allow air to pass through them. This situation here only adds moisture and conflicting air flow into the attic system.
In the worst case scenario, mold can develop in the attic, and the moisture from the bathroom fan vent only feeds the growth. So in short, make sure your bathroom vents to the exterior of your home.