They could be quite old walls and the region has depopulated somewhat since their construction. Or there could be something important enough in the city that a wealthy patron or a neighbouring city funded their construction.