After the first invasion, the world didn't immediately begin to fall and collapse. It was a gradual process. First of all, Mana seeped into the atmosphere and spread through the earth from the Rifts. As time passed and humanity desperately fought back in the war, the planet only continued to suffer more damage. And even now, it continues.
The Mana from the Rifts was what really caused the downfall of Planet Earth.
Allan Fort was one of the first Domed Fortresses to be launched when the earth was increasingly becoming uninhabitable due to the presence of this energy. The Mana caused plagues, natural disasters, and all sorts of adverse effects.
The remnants of humanity sought solace and safety behind the Walls, and that was how Allan Fort came to be. Although it was initially not as complete as it is now, that's a story for another day.