New Agua Clara locks (Atlantic side)
TLDR: President Jimmy Carter really wanted to correct an injustice. His National Security Adviser, Zbigniew Brzezinski, stated that for Carter, the process of handing over the canal:
represented the ideal fusion of morality and politics; he was doing something good for peace, responding to the passionate desires of a small nation, and yet helping the long-range U.S. national interest.
(Quoted in Strong, R. (1991). Jimmy Carter and the Panama Canal Treaties. Presidential Studies Quarterly, 21(2), 269-286.)
The Full Story: The original canal treaty was not signed by any Panamanians, but by a Frenchman, Philippe-Jean Bunau-Varilla. He was a diplomatic representative of the newly founded Republic of Panama, but had not been given the authority to sign deals on behalf of the Panamanian government.