Kirk's ship was refitted at Earth; perhaps that was the only place capable of anything of the magnitude? Significantly, none of the TOS ships was ever indicated to have been to the 23rd century Earth either during the adventures or even at any previous timepoint (not even in connection with adventures involving Earth such as "Tomorrow is Yesterday" or "City on the Edge of Forever"). Obsolescence might have plagued the entire frontier fleet as a phenomenon.
Why would they fail to visit earth at any point during their 5-year missions? In fact, the time travel mission in "Assignment: Earth"
required the Enterprise to be in that system in order to use the "light speed breakaway" effect to travel to the earth of 1968.
After the Gary Seven busniess concludes and Enterprise returns to the 23rd century, there's no reason to think the ship simply warped out to some other location without any number of reasons to orbit or simply be in the general area (for shore leave, Starfleet business, reporting Seven's alien influenced presense--or even tech upgrades).
Or we just started seeing a different set of rooms and angles out of the maze-like, at least fifty-room whole.
The series never lays out the section's entire deck plan. All we ever see is the main engineering room where Scotty conducted most of his business. We were to assume the same room seen in season one was modified to its two-story configuration in season two, since we never see the 1st season version again.