The 2 pipes one a 4 master and the other a 3 2nd do not go through the ceiling but into a common box that goes through the roof.
Vent bathroom fan through wall or roof.
The correct way to vent a bathroom fan through an attic is to terminate the vent either to the roof or to the gable wall.
This involves running ductwork from the fan usually though an attic and out through the roof.
This article describes routing bath exhaust fan duct upwards through an attic or roof space or downwards through a floor or crawl space.
Venting through a roof vent or exhausting them in the attic could cause moisture problems and rot.
In all cases the ducting needs to conduct the exchaust to the building exterior and needs to terminate in an animal proof vent cover.
Bathroom ventilation fan duct routing routing a bath vent duct down out or up through an attic or roof out.
Either way the vent will have to go directly to the outside and installed with a vent hood cover.
The best exhaust fan venting is through smooth rigid ducts with taped joints and screwed to a special vent hood.
The alternative to a roof exhaust if you re concerned about not being able to seal the hole in the roof is to exhaust through a gable end.
The master bathroom and the 2nd bathroom vent through the roof and through the same opening.
It eliminates the need for routing ductwork through the house and these fans usually dry the bathroom more quickly.
The bathroom exhaust ventilation fan disperses air through an opening in the fan housing which is usually 3 inches in diameter and ideally faces in the direction of the ventilation system outlet.
The vent hood will have a little flap that opens when air is blowing through the vent but at other times it will remain closed.
A down through soffit exhaust vent design by leaving warm air in the exhaust duct when the fan is off creates a heat trap that reduces heat loss out of the bathroom through the exhaust fan duct when the fan is off in comparison with up routed vents or even horizontal vents through a gable end wall.
Going through the roof guarantees it will go up in the air and away from your home i would love to see a copy of the building code that suggests venting a bathroom fan through the soffit is recommended.
Vent your bath and kitchen exhaust fans through the roof through a special roof hood.