One of the wierd things about D&D is how the use of defenses actually works to the detriment of the defenders in a standard game of D&D. (Whenever I boot a game of Diablo for a half-hour break this occurs to me.) Here's what I mean:
In the real world, defenses and strongholds are meant to bolster a weak party against a strong party. For example, castles were built to allow a small number of defenders to hold off a large army (for an amount of time, perhaps until an allied force arrives, or the invader runs out of money to pay his troops). The basic idea is that by channeling invaders down some narrow passage, you can fight them one-at-a-time, at equal odds or advantageously, instead at the skewed odds against all the attackers at once.
Now, this assumes one critical criteria -- That the defenders are, man-to-man, about equal or stronger than the men in the attacking force. In the medieval real world, this is basically always true.
But this key requirement is perfectly upended in the standard D&D game. Here, the general gameplay is for a very small number of PCs to be invading the territory of some sizeable hordes of evil beasts or minions, and the PCs are generally much stronger than most of the defenders they're fighting against, man-to-man. It's almost always desirable for the PCs to fight man-to-man if they can (they overpower most of the defenders), while it would be in the defenders' best interest to bring the whole weight of their numbers to play at once (they could surround, flank, and get many attacks per single attack of the PCs).
And that's why, counter-intuitively, almost all the "defenses" and tactical terrain in a D&D game wind up working for the PCs and against the monsters. It's actually the PCs who want to restrict mobility and fight the monsters one at a time. It's the monsters who are hurt by not being able to move freely and pig-pile the PCs.
The best possible case for the PCs is, usually, a single doorway where the toughest PC fighter can stand and chop down the monsters one by one. That's why smart PC fights wind up tactically with the PCs defending some narrow passage, and the native monsters acting the part of the attackers, getting mowed down as they try to wiggle through their own defenses.
And that's one of the reasons why the canonical "warren of kobold tunnels" never ever works (in my experience), because kobolds coming one at a time against the PCs is actually the best possible thing the PCs could hope for. They're the ones who are outnumbered (and facing weaker opponents), and therefore want limited mobility in the fight. Defenses help the small party -- and in D&D that's practically always the PCs.
How to deal with this in-game? Well, as a rationalization, you could say that standard stronghold/dungeon defenses do in fact keep out the hoi poloi (normal soldiers), and that's exactly why you need to send in extra-powerful PCs to root out the evil stronghold all the time. On the other hand, it argues for actual defenders arming themselves almost exclusively with missile weapons, and arranging defenses that allow the entire defensive host to rain down missiles on the attackers all at the same time -- perhaps narrow entryways that open into big spaces or courtyards which are basically firing ranges. A whole bunch of spread-out archers or missile-throwers can be the toughest thing for a standard PC party to deal with (assuming the archers have any kind of appreciable chance at punching through the PCs' armor, which is sometimes not the case).