In the late 1950s, the United States was losing the space race. The U.S.S.R. put the first satellite in orbit and successfully completed the first manned space flight. The U.S. needed something to prove it could compete with the Soviet superpower.
So it decided to nuke the moon.
Project A119, also titled "A Study of Lunar Research Flights," was actually a plan to detonate a nuclear warhead on the lunar surface.