When Californians struck gold, women and families were at the front lines. The balance actually shifted during the Gold Rush. Prior to 1849, Calfornia had a disproportionate amount of men. The Gold Rush brought wealth and opportunity, which attracted women from all over the US. Most of those people had showed up by 1849, hoping to strike it rich.
Men would often journey to California seeking gold, then send for their families after they’d managed to find something. During the earliest years of the Gold Rush, it was not uncommon to uncover nuggets that were worth 10-15 times the average wage of a worker from anywhere else in the US.
Men were also starved for company. Women did act as prostitutes, true, but men also paid women for their company or to buy products specifically made by them. These products often came at a premium, strictly because the men wanted someone to talk to. Women were bakers, founded restaurants and helped pick up the slack while their husbands mined.
Of course, the emphasis on bringing women to California had a flipside to it that few people could have anticipated. Famine, disease and a host of hazardous mining conditions gradually whittled down the population of men in the San Francisco area. This led to an imbalance of the sexes swinging the opposite way, but this imbalance would continue for generations as males began coming to California and gradually evening out the population.