Actually, it existed well before the reign of David I. The site has been fortified since the Iron Age.
You are probably referring to King David's Tower, the foundations of which are now below the Half Moon Battery.
As to why the castle was built in the first place, the answer is geological. The castle sits on top of an extinct volcano, and together with what's known today as the Royal Mile, this forms a 'crag and tail' formation. This is because during the last ice age, a glacier swept past the volcano from west to east, scraping away sheer cliffs on three sides but leaving a gentle slope on the east side. Early settlers saw the great defensive qualities of these features, which is why they chose to build there.
The castle is an ancient stronghold, and was a royal castle for King David I in the 12th century. The castle has been involved in many historical conflicts. Today, Edinburgh's skyline is dominated by the castle
The cast of The King at Edinburgh Castle - 1903 includes: King Edward VII as himself
Edinburgh Castle
Edinburgh castle would have first been built in the 11th century but there are many parts of the castle which were built up until as late as the 20th century. Edinburgh would have been built by King William I (William the conqureror) after the battle of Hastings to give him some extra power and get some more control over his people. Edinburgh castle is known to have been through a seige in 1573 called the Lang seige. Edinburgh castle is still open today for tourists and used for and has been used for many celebrations including the marridge of Mary Queen of Scots.
it was built for the king
king David built an empire for israel
The name comes from King Edwin of Northumbria who established a fort called Edwin's Fort, (or Din Eidyn in gaelic) where Edinburgh Castle now stands. It was later renamed Edwinesburch (Edynbroch); burch or broch is another name for a a fort. Ultimatley the name became Edinburgh which it is called today.
it was built by mr King, or sir Jo King,
The Neuschwanstein Castle
king edward built the first concentric castle
King Willism built some of the castles in England.
These are the names of the castles that King Edward I built after 1277: * Caergwrle castle * Flint castle * Hawarden Castle * Harlik Castle There are also many more castles that King Edward built aswell.