Feudalism began as monarchs started giving control of local territories to lords. These lords controlled almost all aspects of life within their estates. Along with their lands, these lords also owned the peasants who lived on their land, as well as all of their possessions. The peasants were obligated to work for the Lords, farming their lands, and filling other necessary duties.
In exchange for this sovereignty, the lords pledged their loyalty to the king and promised to supply him with knights for his armies. Often a lord would have lesser lords whom he controlled, and greater lords whom he was loyal to.
The same fence that shuts others out shuts you in.