President Kennedy gave his Moon speech (which included other goals, such as telecommunications satellites) 50 years ago today. "A man on the Moon in this decade" was an audacious goal to set: there was no certainty, even in NASA (Wernher von Braun probably excepted: love or hate the man, he never lacked confidence), that it could be done before 1970.
View entire speech
Indeed, JFK wondered about it even after he set the goal. He had a continuing interest in desalinating the oceans, and probably would have made that our top technical goal if it had been more feasible. But he stuck by Apollo, and Johnson and Nixon did so after him, and we made it.
"We choose to go to the moon. We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too."