bulbapedia states that:
The museum can be entered free of charge before Team Magma or Team
Aqua leave, as the reception believes that the player is part of their
group. However, it only works if he/she lacks the 50 fee, which will
prompt the receptionist to believe that the player is part of either
Team Magma or Team Aqua.
They stated this as an exception to the norm. So it seems Game Freak covered their bases in making sure that you can enter when required. This is the only time they'll let you in for free. Otherwise, you're out of luck. Of course later on there is the E4 and Wally, so there is always a source of income after this part of the game.