This is how the feudal society began
Once upon a time there was this great civilised empire, named the Roman Empire. It lasted for quite some time, six to eight centuries, depending on how one counts, but eventually its internal contradictions prevailed, and it split into a poor and unstable western half and a rich and stable eastern half, and in the 5th century the western half fell to pieces.
The economy of the fallen western half of the empire crashed, and the population shrank, and the remaining people lived in small, almost isolated and almost self-sufficient communities.
And in this fallen world some strongmen had the idea of providing protection and a semblance of safety and a sort of justice, in exchange for food and clothes and, most importantly, fealty. Their position was naturally inherited by their heirs, and lo and behold, just two or three centuries later their descendants became known as noble feudal lords.
(And of course the economic basis of the society changed too, with money becoming scarce, and trade shrinking to a shadow of its former importance. For the society was pulverised into a multitude of feudal domains, which ate what they grew, and clothed in fabrics made from the wool of their sheep, and seldom if ever had any surplus produce to sell abroad.)
The bonds of fealty worked both ways, with the vassal owing consilium et auxilium, advice and support, to his lord, and the lord owing protection to his vassal. And this hierarchical society where every man owed fealty to some other man and so on up to the top where the king or duke sat endured for about a thousand years, which period is commonly known as the Middle Ages.