Why did the U.S. want the Panama Canal?
Necessity far more than desire was the factor.
The building of the Panama Canal was begun by the French on January 22, 1881. The French had been behind the building of the Suez Canal in 1869 and saw this as the same sort of project.
By 1885 $235 million had been spent on the project and it was only 2/5 complete. The original construction company went bankrupt and a second company stepped in stating it could finish the project for and additional $109 million.
At the heart of these failures was the French inability to deal with disease, malaria in particular.
In 1902 France was aware of the U.S. interest in taking over the project and sold all rights to the canal to the U.S. for a mere $40 million.
The U.S. saw the canal as a strategic location for shuttling its warships between the east and west coasts, particularly with its newly acquired territory of Hawaii.
As a side note, what we know as Panama today was in 1902 a part of Colombia. At the time the U.S. promised to pay Colombia $25 million for the entire territory of Panama with an additional promise of $250,000, the agreement signed in 1903. It was not until 1921 that the United States "gifted" Colombia $25 million to end Colombia's claim.