How do I fix bathroom fan which is not working?
Without actually being there, and not being able to see the wiring at each of the devices, it's difficult to be sure what's going on. But here's my best guess, based on past experience.

To make it easier, I've numbered the ungrounded (hot) conductors in the photo from left to right.

You've already established goes to a light.
Supplies power to the switches.
Likely goes to the fan.
Also goes to the fan, but since the fan doesn't have a light built in, it's likely capped off at the fan.
Probably feeds some other device, maybe a receptacle.

Why 3 and 5 are controlled by the same switch, I have no idea. Again, I can't see the room, so I have no idea what equipment you have.
If 1 and 4 are both for lights, it makes sense that a singe switch controls them.
One other thing to check, is to make sure the terminals of those switches are rated to accept more than one conductor. There should be a label on the switch that tells you what type, and how many conductors can connect.