
You will recall that despite the destroyed bridge, the Fellowship was pursued by Orcs from Moria. Fortresses practically always had "side exits / entrances", most probably inconspicuous, even camouflaged. Think of the sortie by Aragorn, Gimli and others from the keep of Helm's Deep against the forces of Saruman attacking the main gate.