Princeton’s Robert P. George has an interesting speculation up at the Mirror of Justice site where he contributes from time to time. Here are the key bits of his 10-part chain of reasoning:
(9) [Comey] believed an indictment of Hillary Clinton would essentially force her out of the presidential race and that, whatever the pundits may think, as a practical matter the Democratic Party would not have been able to deny Bernie Sanders its presidential nomination by slipping in a more “respectable” person, such as Joe Biden or John Kerry. (NB: I believe he is right about this. It is not 1924 or even 1968. Party establishment elites no longer have the power they once possessed in the area of presidential nominations.)
(10) He believed that for him to trigger a chain of events that would in all likelihood have left the American people with a choice between Donald Trump and Bernie Sanders, where he could legitimately exercise discretion in such a way as to avoid that happening, would have been irresponsible.
I suppose this is possible. Prof. George goes on to say that he doesn’t respect this motive as matter of law enforcement:
There are the “purists” (again, I’m one) who believe that considerations of the impact on the election of a decision to recommend indictment should have played no role whatsoever.