It's actually a crime for military members to commit adultery, and it's taken pretty seriously (at least in the units I've been in). One can imagine that the penalty for adultery has an impact on divorce rates.
ETA: It's also illegal even if you are single but sleep with somebody who's married (whether the married person is military or not).