It's the game theory playing on individuals' personal interests. The feudal system is aimed at assuring the status-quo for each participant in the power pyramid. The king relies on the high nobles to keep him and themselves in power, the high nobles rely on lesser nobles in the same way, and so on, everyone having to acknowledge and pledge loyalty/protection to someone else in order to get a modicum of security for their stance. Of course, everyone also has to extract and share resources upward. The collective interest is only secondary and this fact, for better or worse, keeps the life simple and fits the human psychic very well.
However, I do not agree that feudal social order is efficient. The nature of relations between people made things very transactional and specific, which imposed hard limits on the amount and degree of mobilizing and engaging people for pretty much anything.