The president is the commander in chief of the army. The DoD does in fact work for the president. This fact, which is not popular on hn is that the USA wouldn’t exist without the DoD. We’d all be speaking Chinese or Russian. The rest of the federal government wouldn’t exist without the DoD.
I don’t think the oath you quoted is much of an argument.