Answer:
The reason why The people who serve in the army have to obey different laws than civilians is because their status as the authority to defend the citizens. This important status make them have to be held to higher standards.
For example, let's say that an army personnel was caught in camera during a fist fight with normal civilians.
That personnel will heavily damage the public perception toward the army. How can you expect those civilians to trust the army as the defender of their safety is they're caught hurting their own people ?
Because of this, the legal punishment that given toward army personnel tend to be stricter than civilians.