Walls are a way of limiting access to an area, from monsters that are not the Deerclops.
There are several practical reasons to build them, and they all involve keeping creatures in or out of a particular area:
- Plant a forest in a walled area, and build Pig Houses to give you assistant lumberjacks that won't wander off too far.
- Plant a Spider Den in a walled area, and add Pig Houses or Rabbit Hutches to create eternal war for your profit, netting you Silk and Spider Glands. Depending on which ally building you use, you might also get Pig Skins, Meat, and/or Bunny Puffs. (Both Spiders and Pigs eat meat items, so be quick.) Just watch out for Spider Queens, after the Spider Den hits tier 3.
- Wall off small groups of berry bushes and place a Tooth Trap at each entrance, so that when they spawn a Gobbler, the Gobbler will die before it eats its way through your entire crop.
- Create a panic room: a room with a single entry corridor, so you can stand in the entry and not get surrounded. (Ideally, this room should be three walls thick, so that melee attacks can't penetrate it at all. Walls don't actually stop attacks; they just keep your enemies from standing so close as they attack.)
- Create a trap room: an open-ended corridor filled with Tooth Traps that you can run through; the monsters will die to the traps.
On a side note, even flooring isn't useless: the cobblestone patches you build act as actual roads, granting you +25% speed when moving along them. Consider building direct roads between your multiple camps or hunting grounds. Flooring also opens up a new potential food source: Lureplant farms. Eyeplants can't spawn on flooring, so you can farm Lureplants for their Leafy Meat.
Finally, there a completely impractical reason to build structures: You've lived so long that you have a massive surplus of resources, and there is nothing else that challenges you. It's time to build a monument to your invincibility: a luxurious castle! All shall hail you as king!*
* Being hailed as king is not yet implemented† in Don't Starve.
† or planned