Canadian living in Australia. Omnivore.
Kicker: Food technologist and health inspector. AMA.
Tl;dr: Doesn't matter if it's meat or veg. It goes in the fridge. Follow 2h/4h rule. Edit: Should specify certain veg are potentially hazardous as soon as you cut in to them, like leafy greens. All cooked or partially veg that should be treated like meat.
For work, I'm fairly strict in businesses because the food can go anywhere once it's in the hands on the customer, even in restaurants or at home. You can look at your dine in customers and they all look healthy, but what if they're not, or where do the leftovers go? Do they take it home after date night to share some with little Bobby or Grandma Jane? In business, you do what you can to keep the food as "clean" as you can.
At home and in food businesses, handwashing is ALWAYS a problem. Food handlers are always touching their faces, phones, hip towel they've had on all day, touching a towel they use used to wipe their hands after only rinsing hands in water in the sink, and then touching lettuce for a salad. So even at home, you can cook things to keep bacteria, but is the scoop, container, and your hands clean? Dust, pollen, flies, hairs, etc also carry microbes, and if any of them fall in to food after its been cooked, the bacteria can grow.
It also depends on the type of bacteria, too. Salmonella can infect at an extremely low dose, and Staphylococcus infects at very high doses.
I follow the 2h/4h rule for anything potentially hazardous. Of course, at home, I'm a bit more flexible, usually +/- 1h. If I make myself sick, alright, but there's no way I'm going to make anyone else sick, so if I'm making food for others, I keep to the strict rules. I'm also generally more risk adverse because the thought of anything involuntary coming out either end makes me sick just thinking about it.
I think the amount of time a food stays out is cultural, and if you grew up with it, your gut will have gotten used to the levels of bacteria. Us westerners generally get sick drinking tap water in certain countries when the locals are fine. I used to live with a Japanese lady for a year, and she knew what I did for a living. She always left rice out all night and ate it the next day. One day, she came to me with it and said "does this smell weird?" and it was a definite yes from me. I'd never leave cooked rice out that long and feel comfortable eating it.
So yeah, Bacillus cereus or whatever bacteria present may not occur all the time, but it does happen. Imagine making large batches and serving to large numbers of unrelated people.
Another thing: Cool foods within 2h to a reasonable temperature (I say 40C is fine) before putting it in the the fridge uncovered. If you put hot food in the fridge, you run the risk of warming up the foods already in the fridge.
Wash your hands.
And use a thermometer. Make sure it's clean before you use it.
Thanks for listening to my Ted Talk.