The basic opsec failures that unmasked James Comey's Twitter show how hard this stuff is

What does working to prevent espionage, sabotage, or assassinations have to do with being good at spycraft?