Insurance giant Aetna’s decision last summer to shut down its Affordable Care Act plans in 11 states created a ton of bad publicity for the law.

Over and over again, Obamacare’s political opponents, including then-presidential candidate Donald Trump, cited the company’s withdrawals as proof that insurance carriers were losing money and the new state insurance exchanges were falling apart.

Aetna executives backed up those arguments by citing poor financial performance as a reason for its withdrawals.

But internal company communications suggest that, in three states, Aetna had other motives: It was trying to win approval of its controversial bid to merge with Humana.

Some of the plans that Aetna shut down were actually making money, the documents indicate. And Aetna remained optimistic that Obamacare plans would be profitable in the long run.

Taken together, these new pieces of evidence would seem like a reminder not to take every report of Obamacare trouble at face value.

The information came to light on Monday, when Senior U.S. District Judge John Bates upheld a decision by the Justice Department to block the Aetna-Humana merger ― a decision that Aetna has said it may appeal. (The company did not respond to requests for comment.)

In his ruling, Judge Bates didn’t simply concur with the Justice Department’s finding that an Aetna-Humana merger would reduce competition and harm consumers. He also said that “Aetna tried to leverage its participation in the exchanges for favorable treatment from [the Justice Department] regarding the proposed merger.” After Justice rejected the merger, Bates said, Aetna pulled insurance offerings from Florida, Georgia and Missouri in part “to follow through on the threat that it made earlier.”

I just can’t make sense out of the Florida decision. ... We are making money from the on-exchange business. Email from an Aetna official, August 2016

To prove his point, Bates cited a series of emails, financial documents and testimony about verbal conversations involving Aetna officials over the past several months.

Here, for example, is what Aetna Chairman and CEO Mark Bertolini said to Sylvia Burwell, then the secretary of health and human services, during a July phone conversation: “If, by chance, you get a reach-out from the [Justice Department] about us as a candidate for this merger, I would appreciate a good word for all that we’ve done with you.”

And here is how Bertolini groused about Justice Department scrutiny to a former Aetna official: “The administration has a very short memory, absolutely no loyalty and a very thin skin,” he said in an email.

Aetna’s motives for withdrawing from Obamacare exchanges first came into question in August, after The Huffington Post obtained a letter that Bertolini had sent to the Department of Health and Human Services earlier in the summer.

In that letter, Bertolini warned that rejection of the merger by Justice Department regulators would lead Aetna “to reduce our 2017 exchange footprint.”

At the time, and later during testimony for the federal lawsuit, Aetna officials said that the company was simply explaining its business position ― that, without the economic benefits of the merger, it could not afford to sustain losses in the Obamacare exchanges.

Bates acknowledged in his decision that Aetna was among the insurers losing money on Obamacare policies and that those losses could have been a factor in considering whether to eliminate insurance plans.

But, the judge said, internal company documents suggested the company remained optimistic about the long-term prospects for the exchanges and was seriously considering expansion, even after learning about its 2016 losses.

I was told to be careful about putting any of that in writing. I will have the attorney client privilege ccd by tomorrow. Email from an Aetna official, July 2016

In addition, Bates noted, some of Aetna’s plans were already profitable, including the Florida policies that it canceled. In fact, when an company official in charge of Aetna’s Florida plans learned of the decision to shut them down, he responded incredulously. “I just can’t make sense out of the Florida decision,” he wrote in an email, adding later, “We are making money from the on-exchange business. Was Florida’s performance ever debated?”

Another reason Aetna decided to shutter those Florida, Georgia and Missouri plans, the judge said, was to reduce overlap with Humana’s offerings and thereby strengthen its case challenging the Justice Department’s disapproval of the merger. Bates even cited evidence that Aetna tried to shield its internal communications on this matter under attorney-client privilege. At one point, an Aetna official talking about plans wrote, “I was told to be careful about putting any of that in writing. I will have the attorney client privilege ccd by tomorrow.”

When deposed, the official acknowledged that he was trying to avoid disclosure of these communications in the antitrust litigation and that Aetna officials had decided to carry on further conversations by phone in order to avoid a paper trail that could come out in legal proceedings.

It would appear the effort was not so successful.

CORRECTION: The highlighted quotes came from Aetna emails sent in the summer of 2016, not 2017.

Sign up for the HuffPost Must Reads newsletter. Each Sunday, we will bring you the best original reporting, longform writing and breaking news from The Huffington Post and around the web, plus behind-the-scenes looks at how it’s all made. Click here to sign up!