This is actually a few different design paradigms you are talking about.
The first is the exploration map transitioning into a battle map during encounters. The second is randomly spawning encounters. The third is forcing players to fight those encounters. Games like Zelda 2 had a exploration map transition into a battlemap, but the encounters are visible on the exploration map and could be avoided if you want so they were never forced or random. On the other hand games like Shining in the Darkness had exploration and battle on the same map; there was no transitions and the view perspective did not change, the game just randomly forced you to fight encounters while you walked around. Then you have something like Vermintide 2 which is a realtime first person action rpg/shooter where random monsters are spawned in at random times on random places on the map to attack you, but the monsters only spawn out of sight in places you are not looking at, and you are not forced to fight them.
IMO battle transitions and forced encounters are outdated mechanics designed around the technical limitations of 8 bit era systems, while random encounters are a great way to improve exploration and overall replay value of a game.