Commissioned officers(including retired) serve at the pleasure of the prez. Even after he was forced to retire, Obama kept him on as the top general in Afghanistan. He got that job when Petraeus moved up to CIA, and held it until the COIN mission ended in Afghanistan
Since when did morality or lack thereof play into Obama’s decisions on anything? He’s deliberately sidestepping what is clearly a DoD function to save face from being a wartime _Resident.