Why was the edimburgh castle built?
There were fortifications on the hilltop used by the ancient tribes that lived in the area, notably the Votadini, later known as Gododdin (or Eiden) after which Edinburgh (= Dun Eiden) was named. They had other hill forts too, such as Traprain Law and possibly Yeavering Bell. It was during the reign of Malcolm III that a castle proper is first mentioned, doubtless as a stronghold during the wars that led to Scotland’s creation and stabilisation. The various conflicts since then increased its significance, especially when the centre of power moved south to Edinburgh. A series of enhancements and rebuilds after bombardments led to what it is at present.