Those rooms have a ridiculously high random encounter rate, so if you pick the wrong door, the game usually makes you go through 1-2 battles because of that. If you wander around that room, you'll get into even more battles. I'm not sure, but I think you can get out of those rooms without having to fight any battles if you cast Warp.