I see both points of view on dungeon design. First, I like for things to "make sense" to some degree; that is, I don't want to disrupt the sense of verisimilitude. On the other hand, I don't think published modules need to have perfectly logical and realistic explanations for everything as part of their design and presentation. Part of the fun of being a DM is exercising your creativity.
I've
been running B4: The Lost City and have come across some situations like those mentioned. For example, my players came across some giant oil beetles in a storage room inside the pyramid. There were two entrances to the chamber: a door (typically stiff and difficult to open) and a secret door. After dispatching the beetles, my players starting looking for another way into the room, since it appeared obvious to them that the beetles weren't "supposed" to be here (they were breaking into crates of food), and couldn't have entered through either of the doors. The module makes no mention of how the beetles got into the room or where they came from. Thinking fast, I described the PCs' search as discovering some air shafts in the wall, high up near the ceiling amidst the decorative carvings that are typically used as a border throughout the place. Having established the presence of these air shafts, I've extended them throughout the complex, and make passing mention of them from time-to-time. They act as ways for small vermin, gas traps, distant sounds, et cetera to be inserted into the adventure in a logical way. The module doesn't mention them at all.
One of the early encounters in the module is a group of sprites in a room with some crates and boxes. Sprites on the upper tiers of a pyramid buried in the desert. No explanation is given for why they're there. I presented them as being sprite-like fey, but not typical woodland sprites. I decided these fey actually lived in the fungal forests of the Lost City, itself (deep below), and the ones in the room were on an excursion to the upper tiers. I've also adapted the "Lost City Fey" to be Neutral parties that sell intelligence to the highest bidder (or sometimes to multiple bidders), and use the air shafts, etc. to move about in secret, spying on everyone and everything. This "silly encounter" thus becomes a integral and interesting part of the adventure.
I've tweaked the map, slightly, to allow easier passage between the upper tiers and the buried lost city without going through secret/undisturbed areas. This kind of tweak was probably anticipated by the designers, because the module mentions that all the factions of the city have means of access to the pyramid which are not shown.
I've changed monsters. As written, the module has a variety of monsters from varied ecological niches, all living in close proximity. I've created the idea of a subhuman slave caste (a long-conquered neanderthal-like people) with workers and "monitors." These subhumans have replaced some other encounters, but I've largely kept the original stats. For example, baboon become subhuman workers. Ogres become subhuman monitors. White apes become monitors that hurl rocks and have white ape stats. An owlbear became a rouge/feral monitor who's been drinking and has owl-bear stats. Et cetera.
Another Lost City DM posted on Dragonsfoot about how he came up with a whole mini-plot because of a dragon in a room that didn't have any egress large enough for a dragon. Obviously, it was a
polymorphed dragon, and it was secretly plotting to usurp the BBEG role.
Anyway, I'm not trying to claim that all old-school adventures were good, but I think people tend to be too quick to dismiss something as "bad design" or "silly" or whatever. I think designers used to *expect* DMs to make additions/changes/alterations to the adventures (heck, B4 gives you whole tiers that are just maps and monster/treasure listings, not to mention the basics, but no details, on the Lost City, itself -- only the upper tiers are fully developed/detailed in the module). It's not that old-school designers didn't know how to design things that "made sense;" they were smart guys, too. I think they just had a different set of priorities and expectations about how the adventure would be utilized.
I used to think "damn, if I buy a module it's because I don't WANT to take the time to come up with all the details." However, lately I've found that I'm using modules as a boost/starting point for my own creativity (and it also helps that I'm running OD&D, so "coming up with all the details" is a lot quicker than it would be under heavier RPG systems). YMMV.