I initially dismissed the promotion as silly but understandable given what the film wanted to achieve by the time the credits rolled.
But then I was reading a book set in WWII and it mentions a few times in passing the concept of 'wartime rank'. Basically that during wartime, a captain might be a major, or a major a colonel, or a colonel a general, or whatever, for the duration of the war within a particular theatre.
It seems to me to be explicable in those terms. Not that they actually are at war by the end of the movie, but that it might make sense to put themselves on a war footing, since they're highly vulnerable militarily after losing so many ships.
But I mean, it's not something that seriously worries me. It would have been kind of a gyp to have him be 'Lieutenant Kirk' at the end of the movie. I'd have felt let down. It's not a documentary, let it be an action adventure.