M&Ms were invented in 1941 as a means for soldiers to enjoy chocolate without it melting. During the war, the candy was sold exclusively to the military.