Just because Jim and Gary are friends doesn't mean they would have been serving together all the time. Spock might well have a longer joint service history with Mitchell than Kirk does, giving the crew chemistry an interesting extra flavor.
The episode does have its own wholly internal chronology/continuity problems. If Kirk has known Mitchell for fifteen years, but Mitchell first met a "Lieutenant" Kirk at the Academy, then both men are about the age of the actors portraying them - yet the onscreen graphics try to suggest Mitchell is but 23 years old.
I don't see the upside of pretending that Mitchell is 23 or Dehner 21, but apparently youth was directly related to sex appeal back then in a rather embarrassing way. At least Michael J. Fox sort of looked the part...
Youth doesn't excuse everything, Dr. McCoy.
[end random quote]