It being federally illegal and something you're prohibited from doing while employed with the federal government means it's at least usable as a mild form of blackmail/leverage if they have evidence you currently use it.
Current use = you're fired + lose your security clearance.
Sure, I don't think most people are going to pick "here's the nuclear codes Mr. KGB agent, just don't tell them about the weed!", but it's enough of an opening to convince some people to divulge some information that they shouldn't.
Add on a few more vulnerabilities - maybe they're struggling a little financially and their job skills don't translate well outside their current government role, and just the threat to their job security can be something significant.
-----
Obviously, federal legalization would basically solve this issue.