Well, microcontrollers deal with digital signals, so you can't feed the audio through a microcontroller unless you convert it to digital with an ADC (analogue-to-digital converter) then back again with a DAC (digital-to-analogue converter). This will affect the sound quality unless you use external converters, and in any case adds quite a lot of complexity.
There are a few microcontrollers that include limited analogue processing capabilities in configurable analogue blocks, but these are the exception.
A microcontroller can control circuitry that affects the signals that are fed to each earpiece. This circuitry could involve analogue switches (ICs), VCAs (voltage-controlled amplifiers), or even relays, to do the switching and mixing.