You have to take into consideration that ships can land on planet surfaces, atmospheric and or otherwise — if they were designed as ships for space ONLY, that would be true.
What do you think is gonna happen to a landed, tall and narrow ship at moderate wind levels?
Even landing on stations, tall narrow ships would be horribly unstable due to the coriolis effect.
Fair. But that doesn't explain the capital ships that are too large to land on planets.
Even if you want to take the "Ships spend more time on planets/stations than they do in space" viewpoint. That explains the shape, but it does not explain the design of the decks. Stairways, Catwalks, Railings, etc are terrible choices for any ship that spends any time in microgravity.
IMHO ships are designed for looks first, realism second (Similarly, ships are about 2x too large). As I already stated we can just hand-wave away the issue by either by claiming advanced Mag-Suits, or Artificial gravity. Both have the same result.