He didn’t do this as part of his job. His wife stole the password. She was employed by the victim.
https://www.washingtonpost.com/local/public-safety/former-fbi-analyst-tells-court-he-was-trying-to-protect-mueller-by-snooping-on-conservative-activists-email/2019/12/20/5d5f143e-234b-11ea-86f3-3b5019d451db_story.html
Yes, and the wife got off scott free.