Many bathroom extractor fans have a permanent live electrical feed for a run-on facility, so they are powered up in a 'standby mode' 24/7, not just when you turn the light on. Turning the light on just sends a signal to the timer to start spinning the fan.