I would imagine that Tolkien was thinking of something similar to Dover Castle when he came up with Helm's Deep?
(And probably Minas Tirith as well)
There are a strictly limited number of points of attack.
Geography makes some directions completely unfeasible.