A medieval castle – like the one from Eindhoven – often was the house in which the lordship lived. Often it was the only stone building in the area he owned. He lived their with his family and servants, taxes were stored here which were paid in nature to the lord by his subordinates.
The lord ruled his territory from his castle. In Eindhoven, the castle was part of the defensive works (reasonably simple) around the town. The one who controlled the castle, controlled the town and the wide surroundings. And there were many wars in the Middle Ages in Brabant. One time, the men from Gelre (Limburg and Gelderland) would win, the other time the men from the Duke of Brabant.