President Trump and Attorney General Jeff Sessions at the FBI National Academy graduation ceremony in Quantico on Dec. 15, 2017. (Evan Vucci/AP)

THURSDAY BROUGHT a sad moment for the Justice Department. The department filed a brief in a frivolous legal challenge to the Affordable Care Act, also known as Obamacare. But instead of following nearly all past practice, the department sided with the challengers. Defending major, duly passed federal statutes is a core Justice Department responsibility. If it defended only laws the president liked, uncertainty about the permanence of many laws would reign, particularly as the presidency changed hands.

There is some precedent for the Justice Department’s move. During the Obama presidency, the department declined to defend the Defense of Marriage Act, a law that, though noxious, Congress passed and President Bill Clinton signed. Government lawyers should have defended it up to the point at which the Supreme Court ruled it unconstitutional. By declining to do so, they inadvertently gave the department’s current leadership some cover to refuse to defend Obamacare.

Yet there are big differences. The Defense of Marriage Act, which denied federal benefits to legally united same-sex couples, was so obviously rooted in prejudice that it posed a major threat to important constitutional principles. The challengers to that law had by leaps and bounds the better side of the argument. The latest challenge to Obamacare, by contrast, is harebrained.

The suit rests on the notion that Obamacare’s individual mandate — the requirement that all Americans carry health coverage or pay a tax to the government — is suddenly unconstitutional, because Congress last year zeroed out the amount the uninsured must pay the government. By this thinking, Congress originally offered people a choice to pay for insurance or pay the tax. Now that there is essentially no tax, they must purchase insurance in order to avoid violating the law. But, as Georgetown Law professor Marty Lederman pointed out, Americans still have a lawful choice: pay for insurance or pay nothing to the government. There is no reasonable doubt that Congress intended for the latter option to be available when Republicans zeroed out the tax.

The challengers’ second argument is even weirder. They claim that because the mandate is now unconstitutional, much of the rest of the law must also be thrown out, as Congress did not intend for its other provisions to stand without the mandate. Except we know exactly what Congress did and did not intend. The only Obamacare reform that lawmakers could stomach passing last year was the limited repeal of the mandate. Republican after Republican insisted that they wanted to keep protections for preexisting conditions and other popular elements of the law. The Congressional Budget Office assured them that repealing the mandate alone, while unwise, would not crash the health-care system.

Unsurprisingly, several career Justice Department attorneys appear to have refused to sign their names to these bogus arguments. Yet even that did not stop the department’s leadership from embracing them — with the approval of President Trump, Attorney General Jeff Sessions ominously stipulated.

The nation’s premier law enforcement agency built a reputation for evenhandedness and independence over the course of decades. That reputation is now more in danger than it has been since Watergate. The threat derives not from self-serving accusations that Justice officials conspired against Mr. Trump but from Mr. Trump and his enablers politicizing the department.