The formation of family and community in the development human civilization is really confusing for me. I think communities were formed before families. I think the variables in a family are more complex than in a community in the initial stages of civilization. Therefore, simple community structure might have formed before family structure.
Men-> community; woman -> family
Well, that's what I think. The men formed community and a woman formed a family. During our hunter-gatherer past men bonded but women missed(Are all women individualistic?). However, the families grew with women at the helm as one night stands might have been vogue in those days.
The religion export
I wonder if it were a community or a family to start mass worship. Probably, both in their own way. With mostly men officiating(could be women too if the hunters included them) the community and women the family worships. However, as families expand and become mini communities of their own the connecting bonding is always male.
Otherday, my grandmother commented that the women have been relegated to become mere cooks in the resurrected Tharavadu temples of my community. In the old days, the female head of the family had the exclusive rights to offer prayers. However, the present Tharavadu temple structure might have escaped from her notice.
The Tharavadu(s) were the joint family houses. Each Tharavadu was identified with the lineages known as illam in Malayalam or bali in Tulu. Nowadays, the joint family system is dead and there are no Tharavadu(s). However, there is an attempt to resurrect these Tharavadu temples. There are many families belonging to single illam, however, instead of each family having a particular Tharavadu temple all these families are identifying a place as the origin of their 'illam' and establishing temple for the family goddess, spirits. And all the people forefront in this endeavour are invariably men. In fact, there are community temples(for castes in general) with primarily goddesses but all the priests and oracles are males. And this was the case when females had the exclusive rights in their Tharavadu(s). So any connection between goddess, matriliny and patriarchy is just random events of community and family. At least, religion has nothing to do in the development of patriarchy though it might have supported male supremacy in the later period.