Accused leaker Jack Teixeira ordered to stop “deep diving” classified info
So the NG document leaker didn't respect direct orders, went into documents he didn't need for his job, and he had been visibility asking inappropriate questions about security and taking notes, which is not allowed. But no one stopped him or relieved him of his duties
Not dismissing his behavior, he should be punished severely. But the leaders didn't actively restrict his access to his job, and expected him to follow orders. However, leaders should always have a plan for rogue employees, just assuming everyone is honest and truthful because they lied under oath is naive and lazy. Military entrance background checks are only to get you in, after that, you are on your own, and can be flipped at any time or be persuaded by other means. . and this is in particular with intelligence.
The criminal mind is much more creative than the average mind, because it has different motives than most can see. Excellent read on the same topic: "Talking to Strangers" , Malcolm Gladwell, and the first chapter is all about "Ana Montes" case where no one was convinced she was a spy.
Hanging might be appropriate in this case.