I don't believe Comey said there would be no prosecution of Hillary...I believe he recommended there be no prosecution of Hillary...Which falls in line with this statement by Lynch...
I don’t think was his place to pass judgement on her actions. As an investigative arm, his job is to deliver a report to the DOJ, who makes the decisions and communicates with the public.
A good analogy would be an administration having the FBI do a background check on a prospective cabinet appointee.
They do the background check, and submit it to the administration for them to decide on whether to proceed. From my understanding, the FBI does not offer an opinion on whether or not they should be made a cabinet member, they leave that to to the Administration.
I may indeed be wrong, but I believe it is the same way with an FBI investigation of nearly any kind.