Help me here... the Enterprise was in year 3 of its 5 year mission, right? Supposedly going places the Federation has not fully explored before, right? And right in the middle of this unexplored territory... is a Federation Space station? With Sulu's husband and daughter?! Apparently, it's just adjacent to this unknown planet where the baddies are getting ready to attack the Yorktown. Because they jump back and forth between the two areas at warp speed within a few hours.
It would be similar to me, wanting to explore the North Pole a century ago, stopping off at a local grocery store conveniently located a few miles from the destination, to pick up extra supplies.
For lack of a better astronomical term, I assumed the Enterprise was always headed AWAY from Federation Space on its 5 year mission. Not zig-zagging back and forth all over the place.
To quote Douglas Adams: "Space is big. Really big."