Free
Castles date from the Middle Ages, specifically from about A.D. 900 to 1500. The Middle Ages were dangerous times.
The map of Europe was constantly redrawn, as empires changed boundaries, and as territories were captured and re-captured.