I've always been fond of the idea that the entire interior was constantly pressurized by the use of force fields. It really is the ONLY reason for complete enclosure and doors of any kind, unless you favor the Starfleet Intelligence paranoia mentality.
But what would be the benefit of having a shirt-sleeve zero-G environment? Especially with reaction thrusters spewing particulates all over the place as starships and shuttles moved about. Sure you could recycle the atmosphere, but that just adds more complexity.
Well, first, What's wrong with complexity? I think it would be a bit naive to just dismiss complexity outright. That space station is undoubtedly one of the most complex structures ever envisioned. You have to look at the underlying purpose behind the design to begin withm whatever that is. All we have is the evidence on screen. The filmakers probably just thought "It's kewl." But the Federation/Starfleet mindset behind it has to be rationalized within the fictional context.
The designers of the station thought it was necessary to build such an enormous enclosed docking area. Lots of room for lots of ships. The more the merrier. However, it only has 4 (I think) relatively tight squeeze openings (for the larger capital ships at least) as the only ingress/egress. Top it off with mammoth, lumbering doors, to ensure that docking area is in fact completely closed off to the rest of the galaxy. Something tells me they might have worked a little complexity into their blueprints.
As to the apparel they would wear while within the dock, shirt sleeve casual and Bermuda shorts might be a bit relaxed for said environment, but at least there wouldn't be the need for such tight restrictions. But imagine some type of dedicated welding garb or the ability to fly around in your workbee without having to ensure complete atmospheric integrity. Imagine getting to step out onto your hull and inspect some minor damage first hand without having to suit up and double check your gear. Might speed things up a bit. Not that I would want Starfleet personnel to start getting lazy or anything but efficiency might be served.
As to the recycling of atmosphere, it might be especially necessary depending on what reaction thrusters actually spew, but despite the complexity it may be worth it. Then again maybe only the small craft use propellant as their primary means of thrust. the larger ships might not use much reaction thrust since Spacedock seems to control all incoming ships, maybe by means of tractor beams and limited thrusters. G's might be controllable in limited and specified areas.
Plus starships displace atmosphere as much as they would displace water, so you would need a system to reduce the pressure when a starship entered and add it back when it left. Again, more complexity.
Unless you are moving 40 starships into that large area simultaneously, I think that such pressure regulation should be simple to remedy.
And what happens when the field fails? When the Probe killed the power, those shuttles and starships would have been sucked towards (and possibly out) the door.
A catastrophic failure like that may indeed have been possible,
had the doors been open. But in TVH there is no indication the doors had been opened yet. But it begs the question, what purpose do the doors serve other than to keep out and keep in. Force fields wouldn't necessarily be actively maintaining atmosphere when the doors were closed.
Starfleet suffered some pretty lame preparedness in TVH if you ask me, but it wouldn't have been the first time or the last. That whole scene was a bit silly actually. Not only did they lose power but the shuttles within the dock actually stopped moving, even though their inertia should have just kept them barreling on forward until they collided with something.
And since non-SF personnel used the station, it would be kind of hard for Star Fleet Intelligence to keep things quiet. Not to mention, as soon as the ship left the dock...
For the record, I don't personally buy the Starfleet Intel Paranoia bit. I was just tossing it out there as the only other (albeit far fetched) reason for a closed off docking area.
No, I believe the reason the dock is enclosed is because it makes it easier for people to transit to and from the ships and made re-provisioning easier. I honestly don't believe it was normally used to build starships. Excelsior was in there because the test crews needed regular access and she was being prepared for her first trials. Galaxy was assembled inside one (at UP) likely because they wanted all the design teams "next door" as they developed and built the ship.
Well, I ask, how does being enclosed benefit the ease of transit to and from the ship? A large docking facility without an enclosed design should have been able to serve that function just as easily and without requiring all the complexity you find unnecessary. Especially if there was no atmosphere, with or without enclosure, an airlock would be mandatory.
P.S. For the record, I don't think it was used as a dedicated building facility either.