The bacteria that may be in the different foods grows, comes completely depends on how you treat the food.
It means a lot if you warms the food cools it down, or lets it stand on the kitchen table for a whole day. And various foods should be treated differently.
When you cook, it's also important, how clean is in the kitchen, how clean you are and how clean all the things you use is.
This is with one word call for hygiene. Is there a good hygiene in your kitchen, and you have yourself a good hygiene, there will be no spread so many bacteria, as if there is a poor hygiene.
That is why a good hygiene is important to prevent corrupting or disease germs get in the food.