https://www.myjewishlearning.com/article/ask-the-expert-matrilineal-descent/
According to traditional Jewish law (halacha), Jewishness is passed down through the mother. So, if your mother was Jewish, you are too. This position is held by most members of the Conservative and Orthodox communities. The Reform movement recognizes the children of one Jewish parent mother or father as a Member of the Tribe if the child is raised Jewish.
...
Shaye D. Cohen, the Littauer Professor of Hebrew Literature and Philosophy at Harvard University, has written a book and several articles on this issue specifically. Cohen found that matrilineal descent evolved from an original policy of patrilineal descent. In the Torah , a persons status as a Jew seems to come from his father. Joseph was married to a non-Jewish woman, and his children were considered Jewish. The same was the case for Moses and King Solomon. The change to a policy of matrilineal descent came in late antiquity.
Cohen has two theories about how this came to be. One is that the Tannaim, the rabbis who codified the concept of matrilineal descent, were influenced by the Roman legal system of the time. According to two sources from the end of the second century CE and the beginning of the third century CE, in a marriage between two Romans, a child would receive the status of his father. In an intermarriage between a Roman and a non-Roman, a child received the citizenship status of its mother.
Cohens other theory is that the Tannaim developed matrilineal descent from an already existing conclusion about mixed breeding in the animal kingdom. The Torah prohibits the breeding of animals of different species, but there is an opinion in the Mishnah (Kilayim 8:4) that suggests that a mule whose mother was a horse and whose father was a donkey should be allowed to mate with other horses. This implies that horse-hood is passed down through the mother, regardless of the fathers species. This concept may have been extrapolated by the rabbis to operate beyond the animal kingdom. Cohen presents both theories, but admits that neither have been conclusively proven.