It's quite funny you say that. In my RPG game I run a world where magic is fairly accessible. Itinerant magician's go from town to town offering their spells to wealthy townsfolk; from mending glass, and crockery to conjuring walls of stone and steel. Books about spell manipulation on how to achieve a curved and tapering stone wall or or how to conjure up a magical glass dome are highly prized. Most magic items are to help with everyday affairs, rather than adventuring and combat.
Many (but by no means most) human towns are bright airy communities where ducks and piglets scamper about while young maidens pick flowers and berries. Lively music can be enjoyed each night as townsfolk bring tables and chairs out onto the commons to share a meal with their neighbours. Indeed, as you say, the towns are walled mainly to protect the town from opportunistic attacks from wandering monsters and not from organised sieges. A wonderful place to return after driving back encroaching bands of gnolls and ogres.
I used to run campaigns of gritty, grim and perilous adventure; where life was cheap. Since I've had kids I like to envision a much more idyllic fantasy world. Often it is this happy way of life (and the valued NPC relationships) that the brave and heroic adventures stride out each week protect.