A provision of the Constitution requires it. Some statute probably reinforces it, but the Constitution (Article III, section 2, third paragraph) reads,
“The Trial of all Crimes, except in Cases of Impeachment; shall be by Jury; and such Trial shall be held in the State where the said Crimes shall have been committed; but when not committed within any State, the Trial shall be at such Place or Places as the Congress may by Law have directed.”
The Sixth Amendment provides:
“In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial, by an impartial jury of the State and district wherein the crime shall have been committed, which district shall have been previously ascertained by law.”
Although Congress perhaps can designate otherwise, the District of Columbia, although not part of any state, has its own district court, so criminal conduct of its politicians goes to that court.
For more information, see Rule 18 of the federal rules of criminal procedure here:
https://www.law.cornell.edu/rules/frcrmp/rule_18
Very interesting. One remedy, perhaps, would be to move the HQ of entities like the FBI out of DC into places like South Dakota .