Quoted By:
To prevent players from being unable to get the Surf HM and thus softlocking their game if they manage to run out of money AND run out of ways to earn it, Pokémon Yellow allows you to enter the Safari Zone even if you don't have the $500 entrance fee, but with a catch: the number of Safari Balls you get is proportional to how much money you can pay.
If you have no money at all, the man at the entrance refuses to let you enter, but if you keep trying to get past him anyway, he grows increasingly angry until he eventually gives up and lets you in with a single Safari Ball.