system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: If cooking kills bacteria, why does it matter how long we leave meat out, or how often we thaw and refreeze it?

Just as the title says, I see a lot of food safety rules around heating/re-heating food, never re-freezing meat after the first freeze/thaw, etc.

Why does it matter if we cook the food in the end anyway?

(Assuming proper temperatures)

Edit:  Wow, quick answers!  Simple enough - noted!  Perhaps I'll be a bit more careful about raw meat.
gpt
Cooking kills bacteria, but if the bacteria was alive long enough it could have left some pretty nasty stuff behind as waste. Cooking doesn't get rid of this waste and it can cause some serious health problems.

Freezing and thawing multiple times is just bad for the food as far as taste and texture goes, unless the thaw time is sufficient for stuff to grow on it, which brings us back to the first point.

Freezing stuff at a nice and low temperature well into the negatives will keep stuff safe to eat pretty much indefinitely, although the quality does tend to suffer after a few months as it will continue to crack and proteins still break down.