NASA was created in response to the launch of the Soviet Union’s first mission Sputnik 1.
“The 183-pound, basketball-sized satellite orbited the earth in 98 minutes. The Sputnik launch caught Americans by surprise and sparked fears that the Soviets might also be capable of sending missiles with nuclear weapons from Europe to America. The United States prided itself on being at the forefront of technology, and, embarrassed, immediately began developing a response, signaling the start of the U.S.-Soviet space race” (History.com).
After Sputnik was launched, the United States was embarrassed because they weren't the first to launch something into space, on their part it looks kind of bad considering they wanted to be the first country to have anything in space.
JFK wanted to be the best nation, which included going to space.
“Those who came before us made certain that this country rode the first waves of the industrial revolutions, the first waves of modern invention, and the first wave of nuclear power, and this generation does not intend to founder in the backwash of the coming age of space. We mean to be a part of it--we mean to lead it. For the eyes of the world now look into space, to the moon and to the planets beyond, and we have vowed that we shall not see it governed by a hostile flag of conquest, but by a banner of freedom and peace. We have vowed that we shall not see space filled with weapons of mass destruction, but with instruments of knowledge and understanding. Yet the vows of this Nation can only be fulfilled if we in this Nation are first, and, therefore, we intend to be first. In short, our leadership in science and in industry, our hopes for peace and security, our obligations to ourselves as well as others, all require us to make this effort, to solve these mysteries, to solve them for the good of all men, and to become the world's leading space-faring nation” (Kennedy).
Prior to this speech being said by JFK, the United States and the Soviet Union were already in a battle to see who could make the most and better nuclear weapons. A goal of JFK was to provide peace and security for our nation and to help the good of all men solve the mysteries of the Soviet Union.