All they need to know for a plain-old no-clearance public-servant position is that you're not beholden to a foreign power (e.g. part of a foreign gang, or in debt to a major foreign corporation.)
There's an easy (though imperfect) heuristic for determining whether you're potentially beholden to a foreign power, from the data they already have: the addresses you've lived at, your job history, and your arrest record. Just join that set to the set of organizations they're tracking as catspaws for foreign powers [and their active locations], count the joined rows, and you have a log-probability that you've ever had the opportunity to interact with someone who might have had cause to convince you to work for a foreign power.
But it was the federal government that insisted that we be US citizens. As far as I know, they didn’t require us to pass any special background check. And they didn’t require us to have any special training. But we absolutely had to be citizens (not just “legally able to work in the country”).
The same cannot be said of foreign citizens (even ones who are permanent residents); to the government's eyes, they're "opaque"—and even background checks run on them would only turn up what their homeland wants the US to turn up. (A background check that could turn up more, wouldn't really be a "background check" any more, but rather espionage, since they'd need to bypass the "public API" of the other government.)