Californias marriage law was very similar to Massachusetts until 1977. It was based on the English/New England model of civil contract instead of the religious ceremony that many younger states legislated.
California had also enacted strong laws forbidding gender discrimination. As such, it was a candidate for a Massachusetts-style court decision permitting same-sex marriage.
However, probably in reaction to that legal structure, the legislators in Sacramento amended Civil Code Section 4100 in 1977 to add that marriage could only be between a man and a woman. Previously it was the Massachusetts-style personal relations arising out of a civil contract, to which the consent of the parties capable of making it is necessary.
Then in 1992, this was codified as Family Code Section 300. Finally, in 2000, referendum Proposition 22 (the Limit on Marriages Initiative) added Family Code Section 308.5, which reads, "Only marriage between a man and a woman is valid or recognized in California."