There are two sets of laws. However, he did something that was considered a security breach. His fault.
He also got convicted in (presumably) a court martial and did his time.