Starfleet builds its ships to engage in and survive combat. Like all military designers, they prioritize resilience and redundancy over efficiency. Ship designers will try to avoid things like putting all of a particular capability on one deck where a single depressurization or power failure could result in losing all function.Actually it does kinda make sense if it were technically practical. Those sections have to be secured, it always seemed weird to be you'd have ~15 areas of a Federation ship that had to have extra layers of forcefields, secure doors, guards, intruder sensors etc. Obviously totally necessary but big drain on resources. If you could reduce that even slightly it'd make things a lot more efficient.
That means that among other things, you wont see them trying to do shit like concentrate all their weapons on one deck.
Not if they can avoid it.