When we first see Dr. M’Benga (chronologically), he is the Enterprise’s chief medical officer. When we see him again, he is still on the Enterprise, but working under Dr. McCoy’s command and, if he was on the ship at the time, under Dr. Piper’s command as well (Dr. Piper was CMO in Where No Man Has Gone Before).
So why do you think he was demoted to a secondary position? Was it something to do with his actions as the Butcher of J’Gal or his killing of Ruh? You would think he wouldn’t be on the Enterprise at all if so. Did Pike demote him? Did Kirk demote him? Was it on orders from Starfleet Command?
What do you think was the reason why McCoy became his superior officer?
I’m thinking that with him no longer needing to control the pattern buffer in medbay and the mental/emotional toll of the war and his experience on the Enterprise, Dr. M’Benga is lining himself up for retirement. This includes him voluntarily letting other peers become the CMO over him, so that he can phase out his responsibilities without significant disturbance after he leaves.