Officials at the Department of Health and Human Services have resisted calls to sue the company for those royalties, saying that such a lawsuit would be expensive and time-consuming and would ultimately not make much of a dent in the drug’s price. They’re probably right. But the prospect of such a lawsuit should have given the government considerable leverage in its negotiations with Gilead.

Mr. Trump appears to have used that leverage poorly. Regardless of how much access to Truvada is increased by the new donation, most Americans who need Truvada will still be charged thousands of dollars a year for the drug, which citizens of most other countries get for a small fraction of that price. Those other countries made no investment in the development of Truvada, but most have access to generic versions of it. Gilead has managed to keep its rivals from introducing generics to the American market through a combination of lawsuits and private deals with would-be competitors.

The company is likely to receive a generous tax break for its latest donation. Drug policy researchers have speculated that if the value of that donation is set by Truvada’s list price, rather than its manufacturing cost, Gilead could reduce its tax liability by about $1 billion. The donated drugs will cost the company less than $10 million to produce.

And then there’s the much bigger tragedy lurking in this news: No matter how Gilead’s donation turns out, a majority of patients who would benefit from Truvada — and whose tax dollars helped pay for its development — still won’t be able to get the drug. Gilead notes, rightly, that its donation is one of the largest ever of medication in the United States. But much more is needed, from the nation’s drug companies and its government, to get Americans the lifesaving medications they need.