I’m torn about them. On the one hand they free up the combat design to be as wildly different from the exploration as it wants. Which can result in really creative stuff. Favorite examples are Undertale, MegaMan Battle Network series, and Tales series.
But on the other they interrupt the flow of exploration, the music, you forget where you were by the end of combat and they can be very annoying if they happen to be common or just as you’re about to leave an area. The consolation prize of growing stronger with every battle only helps so much.
I think there’s better patterns RPGs can use for them.
A lot of games now just put them wandering the world, and touching/attacking them prompts combat. Then, the game needs to invent various motivations for you to actually want to attack the enemy.
In a lot of games, they’re just genuinely in the way through tight corridors to a destination. A better approach can be to associate some kind of minor quest reward to directly pursuing the enemies.
But, then you get the problem that a lot of RPGs just have no interesting decisions to make in combat. And, participating in combat can lead to a slow wearing down of the party’s mana points, or the game’s equivalent. In many games, you only want to use the basic cure spell and auto-attack because you’ll survive fewer fights without mana rationing. It becomes counter-intuitive and less fun.
Some games resolve this well. Cosmic Star Heroine for instance, a short indie JRPG, heals you after every fight, and each combat is uniquely scripted in for pacing much like Chrono Triggwr.