Jerusalem sits on a plateau in the Judaean Mountains, between the Mediterranean and the Dead Sea. The defensive position is why David chose it. The religious significance is why everyone fought to keep it. Five thousand years of continuous habitation, and the disputes are still active.
© Ray in Manila, CC BY 2.0, via Wikimedia Commons