Each time you conquer a city, you gain experience equal to its walls value. This comes in addition to the experience gained from the troops killed and lost. When a lord conquers a city, the walls bonus goes on cooldown for 1 hour and if you try to conquer it again before the end of the cooldown, you won't have the wall experience bonus from it.