Sodium nitrite reacts with stomach acid and other chemicals in the stomach to produce nitrosamines, which have been shown to cause cancer in animals when consumed in large quantities.