U.S. President Barack Obama meets with President-elect Donald Trump on Nov. 10, 2016 in the Oval Office of the White House in their first public step toward a transition of power. (Olivier Douliery/Abaca Press/TNS)

It wasn’t heartlessness that moved President Donald Trump to lift protections for people who had been brought to the U.S. illegally when they were minors, his aides took pains to explain when he made the decision.

The president, they said, does not have the constitutional authority to give them work permits and immunize them from deportation. Congress has never passed a law granting legal status to the affected people.

It’s up to Congress, a White House fact sheet said, “to responsibly address federal immigration law in an appropriate and constitutional manner.”

Trump’s aides are right about President Barack Obama. He did exceed his authority when he acted without congressional approval. Obama previously said that although he thought that people who came here illegally through no fault of their own should have legal status, he did not have the power to grant it. Then he decided he wanted them to have it enough to ignore the formality of the law.

The White House is right, too, that Congress can fix the problem. It can pass a law to keep the affected group from being deported — perhaps as part of a deal that also includes some funding for barriers to illegal immigration at the Mexican border — and it should do so.

But the argument would be easier to credit if Trump were not continuing another Obama policy that raises similar constitutional issues: federal payments to health insurers to cover the cost of reducing co-payments and deductibles for customers with low incomes. Congress has never appropriated money to spend for this purpose.

In both cases, then, Obama acted as though Congress had taken an action it had not. In both cases, conservatives said that his actions were unlawful and initiated lawsuits to vindicate the point. In both cases, Congress has the power to fix the problem.

In both cases, finally, some congressional Republicans have hoped that Trump would keep the constitutionally dubious Obama policy so as to avoid some negative consequences. These Republicans didn’t want to see people who have gotten work permits to lose them or be deported, and they didn’t want to take the risk that premiums would rise for many people without the insurance subsidies (even though the Congressional Budget Office says the risk is low).

So why is Trump continuing the Obama policy for health insurers while canceling the one for illegal immigrants? The main difference seems to be a political one. Avoiding turmoil in health-insurance markets is worth flouting the law; avoiding turmoil in the lives of illegal immigrants — even a highly sympathetic subset of them — isn’t.

Not in this administration.

Ramesh Ponnuru is a Bloomberg View columnist. He is a senior editor of National Review and the author of “The Party of Death: The Democrats, the Media, the Courts, and the Disregard for Human Life.” Readers may email him at rponnuru@bloomberg.net.