California started out as a Spanish colony. Spanish law permeated the area; California, Mexico, and all Spanish colonies. Spain developed laws over its history, including those pertaining to water. Spain is a semi-arid country, where water is at a shortage, many years. The main philosophy has always been that all residents shared the royal patrimony in common. “We have ordered that the pastures, woods, and waters be common to the Indies,” proclaimed the monarch in 1541 in a decree reaffirming an even earlier pronouncement, “… and the foregoing shall be enforced where no title or grant of ours orders differently.” To the missions of California, grants of land and water were strictly temporary. Title remained with the crown and missionaries as trustees for the Indians. Civil pueblos had title to approximately 27 square miles, which became permanent if the residents met certain prescribed requirements, but they could not obtain title to water. Under Spanish law, water in a municipality did not belong to separate individuals, but was passed on from the monarch to the entire community. “Pastures, woods, waters, hunting, fishing, stone quarries, fruit trees, and other privileges shall be for the common benefit of the Spaniards and Indians residing therein. (Source: The great Thirst, by Norris Hundley Jr.)
When there was a limit of water, Spanish legalisms took on great significance. Water remained under rule of the Spanish crown.
Moving forward to 1846, when California was taken over by the USA and two years later gold was found, just outside of Sacramento. The whole philosophy changed. People came in hordes to go for the gold. Those were all free-thinking people, wary of Washington government intervention. They wanted local control, somewhat similar to the Spanish law which acknowledged that land use should be controlled locally as much as possible. But to the new locals that included water rights. Gold diggers need water, but soon water was becoming limited in California, like it always had been in Spain. What about newcomers, who would prospect between you and the water source? The law did not really address that yet. Soon the locals created their own law: First in time, first in right. That became law, and to this day people in California defend that position. That is why we see two farms side by side; one lush with fruit trees, row crops and big barns, while their neighbor barely gets by with dry farming. One inherited water rights, his neighbor was not as fortunate.