The Constitution gives only Congress the power to make rules for governing the armed forces.
The main function of the legislature is to legislate, that is, to create the laws of the country, in all spheres. In this sense, everything that is related to the creation of rules of governance for the armed forces is discussed and approved by the congress.
In this way, Congress creates laws and the executive practices them. The president must enforce the governance laws created by Congress. And the judiciary interprets and protects the laws created in Congress. This is how our democracy works.