Plus, Decker had already been promoted and was overseeing the entire program by this point, and it basically took the intervention of Admiral Nogura himself years later to finally get Kirk his old command back (albeit much too late to prevent the refit).
It's not entirely clear when Decker's promotion happened. What we know is that he was placed in charge of the refit after a four-year tour on USS Boston
(per TMP and Phase II
character notes) as executive officer. Christopher's novel A Forgotten History
suggests that Decker's promotion happened during
the refit rather than before it because Kirk thought he would be the best choice as the new Enterprise
captain due to the enormous effort he was putting into the refit.
Other sources have suggested he was promoted to captain first and assigned to Enterprise
at Kirk's urging because the latter wanted to give his career a boost. The exact nature of the relationship between Decker and Kirk isn't clear. Based on their interactions in TMP, we can reasonably conclude that they were fairly close (I'm basing this on each using the other's first name, something previously done only by Spock and McCoy) prior to Kirk booting Decker from the captain's chair.