Infrared spectroscopy involves shining light through a known substance and looking at the patterns (spectra) made by absorption of light at different wavelengths.
Take an unknown source (say a cloud deep in space) and it may be possible to identify the ingredients by looking at the spectrum of light coming through it and comparing it to that of known compounds.
In the early days of infrared astronomy, people were testing just about anything for fun. Looking at the spectra of the moon, they decided to see if (according to infrared) it was made of cheese. Sadly, the spetctra did not match.
However, a bit more experimentation found the closest match for the moon spectrum. Aerated chocolate – that’s right, your lowly “Aero” bar. This must be the real reason NASA guards the moon rocks so closely.