Why when it’s hot?? Are you referring to high and low volatility?
Hot air will cause more pre-detonation. Even tho our cars have an intercooler, the hot outside air can only cool so much through the intercooler.
Pre-Detonation ( Knock ) is caused by heat.
Octane Rating = Anti-Knock Index (In North America)
Octane Rating in Europe uses a different method, thus European 95 Octane is like 91'ish in North America.
Pre-Detonation is detected by the Knock Sensors. When they sense pre-detonation, they RETARD the Ignition Timing accordingly to compensate. That's why some call it Knock Retard.
Up to 10 Degrees of Knock Retard is still safe, but if you get a spike of 15+ degrees of KR, that could damage the engine instantly.
Colder air is denser and lowers the cylinders temperature, thus helping to keep the pre-detonation at bay.
Other things that cause heat, in turn cause pre-detonation. Like higher compression ratio, turbos and blowers all create more heat than otherwise. So the antidote is higher octane, aka gasoline that is harder to pre-ignite by hot spots in the cylinders.