Official guidance on food safety is always ultra conservative, largely because it has to be simple (else nobody would understand it) but it also has to cover all eventualities.
e.g. room temperature can cover an enormous range. Chicken can be a whole roast, or shredded material (which goes off a lot faster). And it's also important what you do with it next. Are you going to eat it, or refrigerate it.
The simplest way to think about food and spoiling is to imagine a bag of sand with a hole in it. When food is cooked, the instant the temperature falls below 60C, sand starts coming out of that hole. Put it in a fridge and the hole closes up. Put it in a freezer and the hole is sealed.
So if you take a piece of cooked chicken and throw it straight in the freezer. You can take it out a month later, defrost it in the fridge, and eat it 3 days later.
Case 2 - you chill it for 2 days and then freeze it. When you take it out, you used up 2 of those "fridge" days already, so you only have a day left to eat it.
Case 3 - you don't chill it for 5 h after cooking - that could equate to 2 "fridge" days lost leaving you with only 1 day left to eat it. If you freeze it 12h later, then when you defrost it, you only have 12h left!
Note different foods spoil at different rates, cut or chopped meat will spoil much faster than something like a joint.
So as far as the OP goes, assuming their room is around 20C, I wouldn't have any concerns eating the chicken the following evening, but if for some reason I couldn't eat it then, refrigeration at that point would be pointless.