Anastacia Marx de Salcedo of Slate explains the difference between spoilage bacteria and pathogenic bacteria. It turns out the the bacteria that stinks and makes food look disgusting is harmless, but the bacteria that makes you sick "provide no sensory clues as to their presence in food."
Spoilage bacteria turn last week's roast chicken into a scene from Zombie Flesh Eaters. Like the undead, they're everywhere (air, soil, water, plants, and animals), so the invasion of your groceries is pretty much inevitable. Evolved to consume corpses and dead plants, which are customarily served cool, they're the dominant bacteria in your 35-40-degree fridge. (Conversely, temperatures above 85 degrees enervate them.) The stench is from the breakdown of amino acids into amines, which include the evocatively named cadaverine, putrescine, and spermidine. As repulsive as they are, only one, histamine, has been linked to negative health effects, and that's just for people who have allergies to it or who eat certain kinds of improperly stored fish. Spoilage bacteria are harmless.
Pathogenic bacteria make you wish you could exchange your Caribbean bungalow for a hospital room with an IV drip and a bedpan. The preferred habitat of salmonella, E. coli, and campylobacter—three moderately serious foodborne illnesses—is the nutrient-packed guts of warm-blooded animals, but these also do well at room temperature. The journey to your plate usually starts at the slaughterhouse or meat processing facility, where a minute amount of animal poop gets on your future burger. So long as the meat's under refrigeration, that's no big deal, since cold inhibits the proliferation of pathogens (most people can fight off low doses). But then—maybe at home, more likely at a food-service establishment—the ground beef sits out for several hours, allowing the bacteria to multiply. As a finishing touch, you order your patty medium rare, so the center doesn't get hot enough to kill its microscopic passengers. It smells good, looks good, tastes good. (Pathogenic bacteria provide no sensory clues as to their presence in food.) But hours to days later: stomach cramps, nausea, diarrhea, or worse.