If you accompany a Service Person overseas, you will also become subject to certain aspects of Military Law.
This is partly for your own protection so that the Army can deal with cases rather than a civilian court. In such cases, an investigation will be conducted by the Military Police, and you might attend either a standing civilian court or a court-martial.
When overseas, you need to comply with the laws of whichever country you are in, and it is important to make sure that you are familiar with those that might affect you.