For as long as the bathroom window is openable and provides sufficient amount of air exchanges per hour.
Bathrooms, water closet compartments and other similar rooms shall be provided with aggregate glazing area in windows of not less than 3 square feet (0.3 m2), one-half of which must be openable.
Exception: The glazed areas shall not be required where artificial light and a local exhaust system are provided. The minimum local exhaust rates shall be determined in accordance with Section M1507. Exhaust air from the space shall be exhausted directly to the outdoors.
However, depending on your geographical location / if you’re experiencing cold winters and tend to keep windows closed at that time, installation of an exhaust fan would be definitely beneficial.