What is the purpose of military law in general, and the ucmj in particular?
Basically, it is the discipline of individuals to ensure effective control of military force. The President likes to think the generals and admirals will obey his orders, and the generals and admirals like to think their orders will be obeyed. No one likes to think the people with ships, missiles, bombs, planes and guns are not subject to control.