Simple: one (the armed service member) is acting under the auspices and authority of the Uniform Code of Military Justice, and the other (the law enforcement officer) is acting under the auspices and authority of civil law.
The UCMJ grants no authority. It is a separate justice system for military members.
Military members are are still bound by civil and criminal laws. If a service member damages his off post apartment, he could be sued civilly, then given a article 15 by his commander under the UCMJ.
Where are you getting your information?