Castles are just fortified houses.
“In short, home defenses respond to local conditions aiming not for absolute security, but for a balance of security and cost: in safe places, home owners ‘consume’ that security by investing less heavily in it, while homeowners who feel less safety invest more in achieving that balance, in as much as their resources allow. And so the amount of security for a house is not a universal standard but a complicated function of the local danger, the resources available and the individual home owner’s risk tolerance. Crucially, almost no one aims for absolute home security.”
https://acoup.blog/2021/12/10/collections-fortification-part-iii-castling/