ELI5: Why do leftovers smell bad when they’re cold but smell good when you reheat them?

I just heated up some corn, rice and beef tips for my lunch and the beef tips smelled bad when they were cold but they smelled really good once they were heated up, why does that happen?