A castle could have different functions. In most cases, it was the building from which the neighbouring terrotory was controlled. This could be a town, an important road or a larger area. Often soldiers were encamped, a garrison. Besides that, taxes from the area were collected here. These were payed in nature, not in cash. This could be corn. The boss of a castle could be the supervisor who collected taxes in the name of a higher boss (who could run several castles), kept the area under control and protected it from attacks from others. In Eindhoven for example, there were many fights against the men from Gelre, from Northern LImburg. In the 16th century, there were also many attacks from the Spaniards.
The castle was also used as court of justice: the judges themselves were settled in Den Bosch and sometimes passed by to finish the businesses which had accumulated over a month.
A castle was actually a kind of company. Often, there was a chappel or small church. Instead of the supervisor, it could well be, part of the noble family would actually live in the castle, children would for example grow up here. There were many people necessary to take care of the food, to keep everything clean et cetera.