A U.S. federal judge ruled on Thursday that the Pentagon's deployment of the National Guard in Washington, D.C. was illegal.