Damn you for typing faster than me,
Jitty.
Of course, the real-world reason that warp engines are in nacelles was that Matt Jefferies (designer of the TOS
Enterprise) had no clue how warp drive would work but still felt that it would have to be so powerful that the starship designers would want it away from the habitable part of the ship, because it generates so much power that it is dangerous. In other words, they have to be where they are.
As time has rolled on, we've seen that it's possible to "enclose" warp engines within the main body of a ship or closely to it, but there
must be some kind of tradeoff for doing so, otherwise all ships from the beginning of warp drive would have mounted them inwardly.
I believe it has been stated that the
Defiant, for example, is far, far less energy efficient than larger ships due to her enclosed warp engines. Fine of a battleship where shooting off a nacelle might be an issue, but maybe not so cool for a ship that's expected to go, boldly, and a long distance too.
We should therefore, logically, conclude that having the bridge of a ship, or other "weaknesses" exposed, have practical benefits over enclosing them that our 21st century minds might not readily appreciate. We know in the real world that the reason the bridge is where it is was to give the audience an idea of the ship's scale. IMO, the idea that the bridge is designed to be easily ejectable in an emergency or for equipment upgrades works fine to explain this in the Trekverse.
It's also important to remember that these ships are designed and built out of advanced, nearly "magitech" materials to go incredible speeds, so presumably they aren't as fragile as they might appear. Still, the argument has been made many times that without their structural integrity and defensive fields, the position of your bridge or warp core won't matter much when you take into account the incredible amount of destructive power behind Trek weapons.