Its purpose is the main difference between a bathroom exhaust fan and a ventilation fan. A ventilation fan will bring fresh air into the bathroom, while an exhaust fan will eliminate moisture and nasty odors.
Both of these fans draw in the fresh air, but while one does so to increase ventilation, the other serves to filter out potentially dangerous particles from the air inside.