America places a lot of value in the concept of the person having the final say over our armed forces being a civilian. There are multiple very good reasons for that.
Multiple presidents have served in the military prior to becoming president, many of whom have seen combat. The last American president to do so was George HW Bush, who served in the air force and was shot down over the Pacific in WW2.
As to why that hasn’t happened more recently, it’s because the American people don’t see it as a priority. HW Bush was replaced by Bill Clinton. W Bush won over purple heart recipient John Kerry. Obama won over veteran and POW John McCain. Clinton, Bush, and Trump went even farther and essentially dodged the draft.