Thermal managment is important for battery performance and health
The optimal temprature for a battery is around 20-30 degrees celcius for operating. For storage the optimal temprature is even lower.
A battery pack have thermal management system to try keep the battery in the best operating condition.
This include cooling when in use to not overheat.
On some cars it can also heat up the battery before charging to improve charging performance. This is called Active Precondition. On cold days this is necessary to get the full charging speed. Without it charging will take longer time to get to full capacity.
Audi e-tron GT and Audi Q4 has this capability.
In the picture below you see both cooling circuits and axuilerary heater that can heat up the battery when cold.
In this clip you see details about the thermal management system on Audi e-tron GT.