Why it's the capital
The French founded Djibouti in 1888 on an empty stretch of coast. Its harbour was better than the one at Obock, north of the gulf, and it was nearer to the Ethiopian city of Harar, so in 1896 it became the capital of French Somaliland. It stayed the capital at independence in 1977.