They Could Seal Off Entryways
The engineers who had designed these caves had strategically placed humongous boulders on the side of every passageway. The purpose of these boulders was to block off an entire area in the event of an invasion. Also, they were clever enough to plan for an event of a fire as the entire lower levels were available to flee to in case a fire broke out in this underground city.