CA CD's circa 1899. It seems that the bay side of San Francisco was rather densely populated doesn't it?
San Francisco had 1/4 of California's population in 1890. San Francisco would be entitled to 1.72 representatives, and almost 3/4 of the 5th district. San Mateo only had 10,000.
In 1890 how much electrical power would you have? It would be a healthy trek over the mountains to get to the Pacific side. Consider how unpopulated the coastal side of Marin is now. San Francisco as a large city was able to eventually populate areas that weren't really viable otherwise (see Lancaster/Palmdale)