First, though, this Hatch Act stuff is bullshit. The Hatch Act prohibits executive branch employees from engaging in partisan political activism. Just because an action has partisan implications, though, doesn't mean it violates the Hatch Act. Comey was informing Congress about an investigation. Yes, it has partisan implications. Hatch Act, though? Bullshit. Comey did violate Department of Justice practices, though, by issuing a statement within 60 days of an election, which was particularly odd since he had no information to reveal. Why did he violate that practice? That brings me to the "mini-max regret rule."
The mini-max regret rule is the practice of... buckle up... minimizing the maximum amount of regret that you might possibly feel. It's like choosing the path in which the worst case scenario is the least bad worst case scenario possible, but not quite. It's weird. Its most infamous use in political science is in voter turnout. Voting is irrational. Your vote doesn't matter. Yet, voting costs you a bit of time and energy. Spending that time and energy isn't worth it. If you vote, you are a chump. This is where you, the reader, object by telling me that if everybody thought that way, nobody would vote. That's irrelevant since you aren't everybody. You are one person. You control only your own action. And it is irrational for you to vote since your one vote won't make a difference.
Enter the mini-max regret rule. Imagine you didn't vote, and it came down to a tie. They decided to flip a coin, and your candidate lost. Had you voted, it would have turned out the other way. How shitty would you feel? Sure, the probability of that is basically zero, which is why it is irrational to vote, but you would feel so bad if that did happen that maybe you should act to minimize the maximum amount of regret. Get it? Minimize the maximum amount of regret you could feel. Vote, not because it is rational, but to minimize the maximum amount of regret you could feel. If you do vote, and it doesn't matter, your regret is tiny. But, if you don't vote, and it would have mattered, your regret is 'yuge.' Minimize the maximum amount of regret.
The problem is that voting is still irrational. Get over it.
But let's get back to Comey. He did violate DoJ standard practices by making an announcement, with no information, 11 days before an election. Why? Mini-max regret rule. Will the Abedin/Weiner computer have any information that leads to charges against Clinton? No. We basically know that. But, what if it did? And Comey hadn't said anything before the election? That's the maximum amount of regret, and Comey minimizes it by violating DoJ practices.
Comey was applying the mini-max regret rule. That's why he issued the statement. See? You learned a fancy term for semi-rational behavior.