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.
Wizardry 7 comes to my mind. My party has been resting for days, trying to recover hp and sp from the last random encounter. And now as I’m jumped and half obliterated again because not everyone in the party woke up immediately to being attacked, it’s time to rest for another week.