One of the main reasons the United States sponsored a mission to the moon was because of the space race with Russia. Russia was the first country to put an artificial satellite in space, which caused a lot of embarrassment for the U.S.
In 1957, Russia sent Sputnik into space, proving the country had great technological capabilities. Many Americans felt the United States was technologically superior to other countries in the aftermath of World War II, so this feat proved embarrassing for American citizens. There was also some concern that the Soviets would use their space program to put weapons in space, putting the U.S. at risk should another war occur.
In 1961, President John F. Kennedy announced a plan to put an American astronaut on the moon by the end of the 1960s. There was a lot of pressure to overtake Russia and prove the U.S. also had space exploration capabilities. Kennedy also had to overcome the failed Bay of Pigs incident, which was an unsuccessful attack on the southern coast of Cuba. Kennedy felt the U.S. would be able to beat Russia to putting a man on the moon, which would put the country in a more positive light following this failed attack.