A battery releases heat as it converts chemical energy into electrical energy. Higher current and resistance raise the temperature. A cramped enclosure, a thick case, and a hot day make it harder for that heat to escape.
Lithium-ion cells are particularly sensitive to heat. They generally operate most steadily at about 20–25 °C and age faster at 45–50 °C. In extreme conditions, the separator can lose strength above roughly 120 °C, where thermal runaway is a risk.