Random battles simulate the unpredictable nature of going on an adventure in the wild. One moment you're walking along questing after the Magical Boots of Magic +5, the next you're ambushed by a bunch of zombies and have to whip out the swords. This forces you to be prepared for the worst while out-and-about. But the sudden interruption isn't part of the story and doesn't enhance the overall experience. Most random battles aren't even a challenge -- just hold down the "confirm" button and keep attacking for the win. Where's the fun in that?
A few games have gotten the battle structure just right: Earthbound, Elder Scrolls IV: Oblivion, and Chrono Trigger to name a few. Battles are either planned or random, but you can see enemies ahead of time avoid them if you aren't in the mood. The feeling of danger is still present but not at the cost of maintaining the game's flow.
Are random battles an integral part in the role playing experience or should they be left in the dust?