There are two advantages, anonymous.
First, a live-bearing arrangement simply costs more energy for the organism than simply laying an egg and allowing development to occur outside the body. Think of it like this: for all viviparous (live-bearing) animals, their young are physically connected to them right up until birth. The mother is required to basically care for them through their growth and development, and while the overall impact a fetus has on the mother’s body isn’t exactly as drastic as the entire phrase “[your choice of verb] for two” would imply, the fact of the matter is the mother quite literally carries, eats for, and generally manages the life for her young throughout the gestational period. Then, of course, there’s the actual birth, and given the fact that viviparous individuals are more developed when born than animals that hatch, the process of birth requires even more energy to undergo than simply laying eggs.
Second, keep in mind that battling is a huge part of a pokémon’s life, even in the wild. Moreover, battling for pokémon is much more dangerous than it is for animals, because while animals have their own self-defense mechanisms, pokémon use elemental magic and elaborate, violent techniques to fight. Carrying one’s young into battle may be fine once they’re born (see: kangaskhan), but when they’re still developing within the body, that poses quite a risk for them, especially if the mother takes an attack that can penetrate her body and reach her young (see: electric attacks, ghost attacks, psychic attacks, and so forth). Even attacks the mother launches herself could affect a fetus negatively—imagine attempting to generate electricity within your own body, for example. In other words, while it’s true that viviparous animals have a higher survival rate than oviparous, for pokémon, vivipary actually presents more of a risk, thanks to the biggest part of the average pokémon’s lifestyle. At least with egg-laying, a pokémon can guarantee that their eggs are out of range of an attack and thus, for the most part, perfectly safe. Comparatively speaking, anyway.