In a world where magic exists. A large army can hire several mages that able to cast spells as, or even more, powerful than a 16-19th century cannon. The city walls will not keep out a determined mage for more than a few days.
For example: On average, a mage can cast 4 large fireballs per day. 1 fireball is enough to make serious damage to the wall. So, an army with mages can easily break a wall but are not strong enough to raze it down.
Real-life research: In the middle ages, many cities required high walls to protect the people during sieges. The wealthier the city, the better and stronger the walls. When gunpowder and cannons using stone balls were introduced, walled cities soon lost they advantage and many started to decline. This gave rise to the "new" design of bastion or "star" forts which were better suited to outlast the destructive fire of the powerful cannons.
When the cannons switched from the 15th - 16th century stone to more effecive iron balls and shot during the 16th to the 19th century it sounded the deathblow to the effectiveness of high city walls. Only the wealthiest cities could afford to make all the changes necessary for effective defence against the advanced cannons and even then they were soon rendered obsolete.
It was during this period, the Middle Ages, that cannon became standardised, and more effective in both the anti-infantry and siege roles. After the Middle Ages most large cannon were abandoned in favour of greater numbers of lighter, more manoeuvreable pieces. In addition, new technologies and tactics were developed, making most defences obsolete; this led to the construction of bastion forts, specifically designed to withstand artillery bombardment though these too, along with Martello towers, would find themselves rendered obsolete when explosive and armour piercing rounds made even these types of fortifications vulnerable.
Limiting Factor on Magic System: Searching Medieval army sizes on History Discussion Forum, the first answer found stated that instead of the 100 000 - 500 000 (or more) soldiers often mentioned, modern scholars believe that armies were closer to 10 000 - 15 000 soldiers only. Coalitions being maybe double that at 30 000 soldiers. If an army this size could only retain the use of 6-7 mages, that indicates that magic is fairly restricted/expensive in the fantasy world in question (if we used the larger embellished numbers, magic users would be even rarer).
In a world with mages capable of destroying city walls in 2-3 days, why would people still find it useful to have these "old-fashioned" high walls around their cities?
Note: the question isn't focused on how powerful the mages or the fireballs are, but rather if and why the cities would still find high walls useful in the wake of such destructive forces.