Exactly the UCMJ guides my morals in the exact same way the laws where you live guide yours. so how are we different again?
The difference is in
other moral issues outside of the basics, murder, rape, etc...
You let the UCMJ tell you what to think even though you don;t actually follow it 100% by not blowing the whistle on your gay co-worker.
I have my own moral code that isn't governed by anyone but myself.