Nitrosamine is a known carcinogen that forms in salted meats when the red colour was needed to be preserved using potassium nitrate or sodium nitrite. Grey ham, bacon, corned beef salami etc don't look very appetising. Which is why ascorbic acid (vitamin C) is used these days instead. The amount of ascorbic acid/nitrate/nitrite used is minute; typically 0.5%.
Do not "eat your bacon raw". It needs to be cooked before consumption!