Two judges questioned the Justice Department's lawyer about how the Trump administration's position squared with the law.