In the Early Middle Ages, even noble titles didn’t necessarily follow the male line by primogeniture. At first they weren’t even inheritable. Instead, the king decided who would get the title and the associated land on the previous person’s death. Eventually though, it just became easier to give it to one of the person’s heirs. Over time, “heir” became codified as “eldest son or next male relative”
Before primogeniture became the rule (and in places where it never took hold), the inheritance was generally divided up between siblings, usually but not always equally. The benefit of this system was that parents could make sure each of their offspring had a share and therefore a way to support themselves, daughters included, though sometimes they received less. The problem, of course, was that it meant family land got broken down into smaller and smaller pieces over time, reducing the resources any one individual could draw on.
Primogeniture meant that family land and other wealth stayed mostly in one piece, keeping the inheritance largely intact for each successive generation. This system, though, had its own problems. For one thing, it meant that unless all of their brothers died,* daughters inherited nothing more than their dowries, which usually weren’t under their control. Younger sons had no hope of an inheritance either unless their older brothers died or they married an heiress. It also meant that if a man failed to produce a son or something happened to all of his sons, the property might well pass right out of the family’s hands, going with his daughter to a new family.
*Or were otherwise made unable to inherit. Monks, for example, renounced any claim on the family property.
Gies, Frances and Joseph Gies. Marriage and Family i the Middle Ages. New York: Harper & Row, 1987.
Erler, Mary and Maryanne Kowaleski, eds. Women and Power in the Middle Ages. Athens, GA: University of Georgia Press, 1988.
Winks, Robin W. and Teofilo F Ruiz. Medieval Europe and the World. Oxford: Oxford University Press, 2005.