Nuclear bunker if sealed up airtight with proper doors.
Their plan for continuation of government perhaps - same as we have elaborate structures for our leaders to evacuate to today at a moments notice.
An event took place approximately 12,000 years which killed millions of humans and animals worldwide like the Clovis people of North America, mastodons and other large mammals worldwide.
Relatively fresh memories/legends may have indeed led to construction of these massive structures for protecting the elite of their day, not only in Egypt but in the Americas as well.