Food poisoning is no fun. And if severe enough, it can make you dangerously sick. Leftovers older than 3 or 4 days may be rife with bacteria known to cause food borne illnesses. Bacteria on leftovers often won’t change the smell, look, or taste of food. So, don’t’ think if it smells or looks OK, it is OK. When in doubt, toss it out.
And if you plan to freeze leftovers, do so right after cooking them, not 2 to 4 days after they’ve been sitting in the fridge.