Kubrick shot the (fake) moon landing, and NASA gave him the lens he used to shoot Barry Lyndon as a reward.
But, ah, you'll say, I know the joke! He was such a perfectionist that he shot it on location!
Wrong! Kubrick hated traveling. He filmed it in London.
He was a perfectionist, though, so he had NASA land astronauts on the moon to take reference pictures for the backgrounds.