It's Friday and thus Collections time. This week, at long last, the final installment of my series looking at the Siege of Gondor from a military historian's perspective. We talk about cohesion and what really wins battles. https://acoup.blog/2019/06/14/collections-the-siege-of-gondor-part-vi-black-sails-and-gleaming-banners/ …
It depends on the local security situation. Rome was founded on a set of (famously seven) hills for defensive purposes. Southern France is littered with hilltop villages - it was a conflict zone in the Middle Ages. Tolkien is dramatic in his placement, but not crazy.