Must have used Gallifreyan technology.
Not the first Trek ship that was bigger on the inside. The TOS shuttlecraft interior set had a higher ceiling than the exterior mockup. The TMP rec deck can't fit into the saucer (due to the concave undercut on the saucer underside), and the TMP engineering set includes a forced-perspective-painting corridor extension that would stretch clear through the deflector dish and beyond.
It's pretty common, actually. The
Jupiter 2 in the
Lost in Space pilot had just one deck. It was given a lower deck in season 2, and the miniature was modified with smaller windows to reflect the change, but the show still used stock footage of the unaltered miniature in some shots. And then in season 3 they added an engineering deck and a space pod hangar,
without altering the miniature again.
Not to mention all the various sitcoms and such where the interior sets are too big to fit inside the houses used for their exteriors. Or the inconsistent size of UNCLE headquarters in
The Man from UNCLE. Or the fact that
M*A*S*H's 4077th compound out on location had a lot more space between the tents than the version on the soundstage. One of the few cases where an interior set was
not too big for its corresponding exterior was Jim Rockford's trailer on
The Rockford Files, but there were some episodes where fight scenes or the like inside the trailer set crossed over where the fourth wall should've been.