Sodium nitrate (NaNO3) and its close relative sodium nitrite (NaNO2) are preservatives that you find in lots of processed meats. Salami, hot dogs, pepperoni, bologna, ham, bacon, Spam, etc. all normally contain sodium nitrate as one of the ingredients. Fresh meats generally do not contain any added chemicals, so the question is, "why is sodium nitrate added to all of these processed meats?"

There are two reasons for adding these chemicals to processed meats. First, they preserve the color of the meat (meaning that it looks pink like Spam rather than gray like cooked hamburger). You have probably noticed that nearly all meats that contain sodium nitrate/nitrite remain pink or red even though they are cooked during processing. The other reason is that these chemicals inhibit botulism (see Question 214) to some degree.

The jury is out on how harmful these substances are. 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. However, there's not much sodium nitrate/nitrite in meats and we consume sodium nitrite/nitrate from other foods as well, so it is not clear that they are harmful in the quantities we get from meats. Some people recommend that small children and pregnant women avoid these chemicals altogether just to be safe. Since neither canned chicken or tuna have any redness to protect, they generally do not contain nitrates.

Here are several interesting links: