Fortifications help both you and the enemy to increase the chances of survival in a raid attack. They help prevent damage. Siege engines damage fortifications but not soldiers.

Each fortification adds a plus 1 percent chance to keep your soldiers from falling in battle.So if you have 100 fortifications your troops are immortal!unless a siege engine destroys a fortification.