A Cuban girl waits with her asylum-seeking family on the Mexican side of the Brownsville-Matamoros International Bridge after being denied entry by U.S. Customs and Border Protection officers near Brownsville, Texas. (Loren Elliott/Reuters)

IN LATE June, Alex Azar, secretary of Health and Human Services, assured migrant parents whose children had been snatched away by U.S. border officials that there was “no reason” they could not find their toddlers, tweeners and teenagers. Then it turned out that Mr. Azar’s department, which is in charge of the children’s placements and welfare, doesn’t have a firm idea of how many of those children it has under its purview. Or where all their parents are (or even whether they remain in custody). Or how parents and children might find each other, or be rejoined.

On Thursday Mr. Azar was back with more rosy assurances, this time that the government would meet a court-imposed deadline to reunite those children with their parents — by Tuesday in the case of 100 or so kids under the age of 5, and by July 26 for older minors. A day later it turned out the government was begging the court for more time.

Mr. Azar blamed the judiciary for setting what he called an “extreme” deadline to reunify families. Yet as details emerged of the chaotic scramble undertaken by Trump administration officials to reunify families, it is apparent that what is really “extreme” is the government’s bungling in the handling of separated families — a classic example of radical estrangement between the bureaucracy’s left and right hands.

A jaw-dropping report in the New York Times detailed how officials at U.S. Customs and Border Protection deleted records that would have enabled officials to connect parents with the children that had been removed from them. No apparent malice impelled their decision; rather, it was an act of administrative convenience, or incompetence, that led them to believe that, since parents and children were separated, they should be assigned separate case file numbers — with nothing to connect them.

The result is Third World-style government dysfunction that combines the original sin of an unspeakably cruel policy with the follow-on ineptitude of uncoordinated agencies unable to foresee the predictable consequences of their decisions — in this case, the inevitability that children and parents, once sundered, would need at some point to be reconnected.

Now, faced with the deadline for reuniting parents and children set June 26 by Judge Dana Sabraw of U.S. District Court in San Diego, hundreds of government employees were set to work through the weekend poring over records to fix what the Trump administration broke by its sudden and heedless proclamation in May of “zero tolerance” for undocumented immigrants, and the family separations that immediately followed.

Mr. Azar, following the White House’s lead, insisted any “confusion” was the fault of the courts and a “broken immigration system.” In fact, the confusion was entirely of the administration’s own making. The secretary expressed concern in the event officials lacked time to vet the adults to whom it would turn over children. Yet there was no such concern about the children’s welfare, nor the lasting psychological harm they would suffer, when the government callously tore them away from their parents.