Heat wins most of the fight against foodborne bacteria. Cooking to a safe internal temperature reliably kills the active form of the bacteria responsible for the large majority of foodborne illness. But a smaller, important group of bacteria produce heat-resistant spores or toxins that survive cooking entirely, which is why proper handling before and after cooking, not cooking temperature alone, is what actually closes out the full fight.
This distinction matters because it explains a case that otherwise seems confusing: food that was cooked correctly can still make someone sick, not because the cooking failed, but because of what happened to the food before it ever reached the heat.
Where cooking temperature wins outright
For the vast majority of foodborne bacteria, including Salmonella and most strains of E. coli, cooking to a sufficiently high internal temperature, generally in the range covered by standard USDA and FDA safe minimums for meat, poultry, and seafood, reliably destroys the active bacteria. This is genuinely the most important single food-safety step available, and it's why hitting the right internal temperature, confirmed with an actual thermometer rather than guessed at by color, matters as much as it does.
Where cooking temperature has real limits
A smaller set of bacteria complicate this picture. Clostridium botulinum and Clostridium perfringens can form spores, a dormant, thick-walled state that's considerably more heat-resistant than the bacteria's normal active form. These spores can survive typical cooking temperatures and, under the right conditions afterward, particularly food left too long in the temperature danger zone, germinate and grow.
Separately, Staphylococcus aureus and Bacillus cereus can produce toxins while growing in food that's been left out too long. These toxins, not the bacteria that made them, are the actual problem, and food-safety research on both organisms describes their toxins as notably heat-stable, holding up under cooking and reheating temperatures that reliably kill the bacteria itself. Once these toxins exist in food, cooking or reheating that food afterward kills the bacteria but does nothing to the toxin already present.
Why this makes handling before cooking just as important
The temperature danger zone, the 40°F to 140°F range where bacteria multiply fastest, isn't just relevant to whether bacteria are present. It's relevant to whether toxin-producing bacteria have had enough time to actually produce toxin before the food is ever cooked or reheated. Food that spent hours in the danger zone before being cooked can already contain heat-stable toxin, and cooking it thoroughly afterward doesn't undo that.
Proper cooling of cooked food matters just as much as proper initial cooking, for the same reason. Cooked food left to cool slowly at room temperature, rather than refrigerated promptly, gives these same toxin-producing bacteria a second opportunity, and reheating that food later addresses the bacteria but not any toxin that formed during the improper cooling period.
Why toxin-producing bacteria show up so often in specific foods
Certain foods carry an outsized share of the real-world risk here, not because they're uniquely dangerous, but because of how they're commonly prepared and stored. Rice is the most frequently cited example: cooked rice left at room temperature for an extended stretch, then reheated once, sometimes twice, gives Bacillus cereus a realistic window to grow and produce toxin before anyone eats it, covered in more detail in our guide to rice storage. Cream-based sauces, custards, and dishes held on a buffet line for hours share a similar risk profile, since all of them combine nutrient-rich food with extended time at room temperature.
Home-canning and improperly sealed low-acid preserved foods carry the Clostridium botulinum risk specifically, since the sealed, oxygen-free environment inside a can or jar is exactly the condition botulinum spores need to germinate. This is a separate concern from everyday cooking and reheating, and it's why home-canning guidance focuses so heavily on processing time, acidity, and proper sealing rather than simply "cook it well."
Symptoms differ depending on which risk you're dealing with
Illness from active bacteria that survived undercooking, Salmonella or E. coli among them, typically takes hours to a couple of days to show symptoms, since the bacteria need time to establish themselves after being eaten. Illness from a pre-formed toxin works differently and often faster, since the toxin is already active the moment it's eaten rather than needing to grow inside the body first. Staphylococcus aureus toxin, for example, can cause symptoms within just a few hours of eating contaminated food, a noticeably shorter window than many bacterial infections.
This distinction is useful less as a way to self-diagnose and more as a reminder that "I cooked it thoroughly" doesn't rule out foodborne illness on its own. If food sat out too long before it was ever cooked or reheated, thorough cooking afterward addresses the bacteria but may not address a toxin that had already formed.
What this means in practice
The practical response to this isn't more cooking, since more heat doesn't solve a toxin problem the way it solves an active-bacteria problem. It's tighter control over how long food spends in the danger zone, both before initial cooking and after, refrigerating promptly rather than leaving cooked food out to cool on the counter for hours, and following the same 2-hour guidance regardless of whether the food will be reheated again before eating.
This is part of the reasoning behind the specific storage windows covered for cooked shrimp, cooked salmon, and other cooked seafood on this site: those windows exist because time in the danger zone, not just the presence of bacteria in general, is the actual variable driving risk.
If you're the one responsible for cooling and storing food after a meal, whether that's leftovers at home or food served at a gathering, treat the clock as starting the moment cooking finishes, not the moment it's convenient to deal with the extra portions. Splitting a large batch into smaller containers before refrigerating, covered in our meal-prep temperature guide, is the single most effective habit for closing the gap that cooking temperature alone can't cover.
Why freezing doesn't solve the toxin problem either
Freezing, like reheating, addresses active bacteria but not a toxin that's already present, since freezing halts bacterial growth rather than destroying whatever the bacteria may have already produced before freezing began. Food that spent too long in the temperature danger zone before being frozen carries the same toxin risk into the freezer that it would have carried into the refrigerator, meaning freezing isn't a way to retroactively make improperly cooled food safe, only a way to extend the storage life of food that was already handled correctly from the start.
This is a useful distinction to keep in mind alongside the cooking-doesn't-fix-it point covered above: neither cooking, reheating, nor freezing can undo a toxin that formed during an earlier period of improper time-temperature handling. All three are valuable tools for their intended purpose, killing active bacteria or extending storage life, but none of them substitute for getting the cooling and storage timing right in the first place.
Restaurant kitchens and why this principle shapes professional practice
Professional kitchens are trained around exactly this distinction, which is part of why commercial food-safety guidance places so much emphasis on rapid cooling procedures, shallow pan storage, and blast chillers in kitchens that handle large batches regularly. A restaurant cooking a large pot of soup or sauce faces the same slow-cooling problem covered above for home meal prep, just at a larger scale, which is why commercial kitchens generally have dedicated equipment and documented procedures specifically for cooling large batches quickly rather than relying on a standard refrigerator to handle the job unassisted.
Understanding that this is a genuine, well-established professional concern, not just a home-cooking inconvenience, underscores how seriously the underlying principle is taken across the food industry: cooking temperature is necessary but not sufficient, and the time food spends in the danger zone before and after cooking is treated as an equally critical variable in any kitchen that takes food safety seriously.