This seems to be another example of something fans seem to view as ‘canon’ but isn’t actually consistent with what was onscreen. A kind of ‘Mandela-effect’ headcanon.
In TOS, M’Benga was specifically asked by McCoy to come aboard and act for him as CMO while he was away. Asking a former CMO to come back, shadow you for a short period and then act for you makes a lot of sense when there are members of the crew of other or mixed species.
It was quite clear that M’Benga was in transition towards a Chief Medical Officer post on a Station. That would suggest M’Benga already had the rank and was qualified for the job.
Meta-wise, this was actually another one of Roddenberry’s backdoor pilots, this time for a Starfleet medical show based on a station.