Watch out for unfinished DIY jobs. A bathroom exhaust fan terminating inside an unfinished attic can cause many problems.
A bathroom fan is intended to remove humid air from the bathroom. A properly vented exhaust fan delivers that air directly outside. If the duct is vented into the attic, problems can arise from the excess heat and moisture.
The moisture can settle on the framing and insulation leading to mold and rot. In the winter the warm air being sent into the attic can heat an area of the roof and cause snow melt. The melt water will run down the roof until it reaches a cold area where it will refreeze. This is how ice dams form. Ice dams force water under the shingles which can lead to water damage in the house.
When you are buying a home, make sure your inspector confirms the proper installation of these devices, especially when it looks like a DIY job.