A GFCI controls all the lights in the bathroom
A GFCI receptacle has line and load connections. This is different from an ordinary receptacle that has two sets of screws that are functionally identical (as long as the magic tabs are not removed).
This may have been deliberately installed this way. But it is quite possible it was a retrofit GFCI (which is a good idea - they are important safety devices for bathrooms) and the installer didn't understand that GFCI line/load is not the same as a regular receptacle's two sets of screws.
The one catch is that if ant of the lights or the fan are above the tub/shower then they must also be GFCI protected. Assuming that is not the case:

Turn off the breaker and make sure power is out (receptacles dead and lights/fan won't turn on)
Open up the box and pull out the GFCI/breaker. Take pictures, in case anything goes wrong.
Disconnect the wires from the line and load sides.
Connect all the hot wires (these are wires that were on brass or black screws, should be black wires but not always) together with a wire nut and add a short 12 AWG black wire as a pigtail and connect that to the hot line screw.
Connect all the neutral wires (these are wires that were on silver screws, should be white wires but not always) together with a wire nut and add a short 12 AWG white wire as a pigtail and connect that to the neutral line screw.
Put everything back together and turn on the breaker.
Verify that the GFCI TEST/RESET buttons work.
Verify that the receptacles work.
Verify that lights/fan work and that GFCI TEST does not shut off the lights/fan.