The cold war lead to the space race by pitting each country against each other when they realized the military capabilities of objects in space. They could travel farther, faster. They could have satellites loaded with nukes. Etc. So each country wanted to be the first up stuff. There was also that moral point for civilians because they each wanted to show their tech was better with the end point being to be the first on the moon.