Historically, a castle served two primary and intertwined purposes: military defense and administrative lordship. First and foremost, a castle was a fortified military structure designed to protect its inhabitants and control the surrounding territory during an era of frequent warfare. Its architectural features—such as thick stone walls, moats, drawbridges, and battlements—were engineered to withstand prolonged sieges and repel invaders. By providing a secure base for garrisoned troops, a castle allowed a ruler to project power across the landscape and secure strategic points like river crossings or mountain passes. Secondly, the castle served as a palatial residence and administrative center for a lord or noble. It was the seat of local government where taxes were collected, justice was administered in the lord's court, and legal records were kept. Unlike a simple fortress, which was purely military, a castle was a domestic home that reflected the social status and wealth of its owner. It acted as a visible symbol of the feudal system, reinforcing the social hierarchy by physically towering over the local peasant population. Thus, it was simultaneously a machine for war and a center for civil authority and high-society living.