Ailuaractos lufengensis (ancient pandas) had existed in East Asia, more precisely South China nowadays, since 8 million years ago.
They were certainly not exclusively found in East Asia though – Agriarcros goaci, one of their related species, had once spread through European humid forests in today’s Hungary and France.
But the entirety of Europe was covered in ice during the Ice Age of late Miocene. They went extinct as a result.
As Pleistocene took over, the panda family expanded around East Asia. They have conquered the entire Middle-East China at their peak.
But the five enormous glacial movements threatened their survival. Qinling and Daba Mountains that range from West to East have blocked the cold current from flowing down South, making the climate near Min Mountains and Liangshan warm and humid.
A suitable climate has provided giant pandas a paradise where they could survive in for millions of years.
Last but not least, the focus on their habitats by China, especially since the 1980s when the Chinese government started to invest a lot of manpower and monetary support into helping the giant pandas, has stopped the drop in their population.