Paul W. answered 04/07/19
Dedicated to Achieving Student Success in History, Government, Culture
It should be noted that the concept of 'Feudalism' itself is now in doubt among scholars who study the Middle Ages. To learn more about this issue, I would recommend the ground breaking study by Susan Reynolds, Fiefs and Vassals: The Medieval Evidence Reinterpreted. Oxford: Oxford University Press, 1994.
That being said, a common feature of Medieval political organization, whether or not one refers to it as feudalism, was the tension between Monarchs (usually male) and local rulers, whatever their title. Quite naturally, Monarchs sought to monopolize the power to rule within their kingdoms, and equally naturally, local rulers resisted losing any of their independence to their rightful king.
Among the most critical factors that enabled local rulers to maintain (and, when the opportunity presented itself, expand) their control over the lands they ruled was their possession of private fortresses - castles - and private armies. Among the most daunting problems for Medieval Monarchs was the limited military forces that they had under their control (kings usually had 'Household troops', a small number of knights and foot soldiers). Hiring mercenaries was an option, but Medieval Monarchs were almost always strapped for cash (significantly, the Magna Carta that the English barons forced King John to sign restricted the king's ability to hire foreign mercenaries).
In order to raise an army, Medieval Monarchs had to rely on the cooperation of local rulers to serve the king at the head of the contingents they were willing to bring to a muster, cooperation that was not always forthcoming. The problem was that in order to curtail the independent power of local rulers, Monarchs would have to employ an army to defeat a local ruler's own forces and to besiege a local ruler's castles (a costly and time consuming affair). But it was contrary to the interests of local rulers, whose contingents made up a king's army, to help the king to curtail the independence of a fellow local ruler. Small wonder that it took Europe's Monarchies centuries to consolidate their control over their kingdoms (such was the case for the kingdoms of England and France, in contrast to the Holy Roman Empire, in which the Emperor's power actually declined during the Middle Ages).
While it was true that all of the subjects of a kingdom technically owed their allegiance to their rightful Monarch, during the Middle Ages this was a vague concept in contrast to the tangible reality of one's immediate lord. It was upon one's lord that an individual depended for protection, support, potential reward, and most of what one needed for survival. Small wonder, then, that individuals generally remained loyal to their respective lords, even when those lords rose in rebellion against the 'rightful' king.
The lords themselves, who were either local rulers or in the service of local rulers, as subjects of the king, also technically owed their allegiance to their Monarch. But, as noted above, they were also determined to guard their independence, enshrined in various rights to rule that they claimed as legally their own. It should be noted that those who rose in rebellion against their king often justified their actions on the basis of the king violating the rights of local rulers (again, King John and the Magna Carta is a perfect example).
It should also be noted that a common cause of rebellion was the all-to-frequent succession disputes that arose when more than one Royal individual claimed the right to rule as the next king. In such cases, those in rebellion denied the label of 'rebels', claiming that their candidate for the throne was the rightful Monarch and their support for said candidate's claim was an act of loyalty to the rightful king and, therefore, could not be construed as rebellion.
In any case, rising in rebellion against one's Monarch during the Middle Ages, while risky, was rarely fatal. Commonly the harshest form of punishment imposed by a king on a defeated rebel - that is, a rebel who was a member of the nobility - was the often temporary confiscation of land and a short period of exile. Time and time again Monarchs would pardon rebels, reinstating them in their positions of local rulers. As such, it's not hard to understand why resistance to the point of rebellion against one's 'rightful' king during the Middle Ages was such a common occurrence.