You use the gun instead of the Pokemon because the gun won’t refuse orders, need to eat or be trained up to level *checks* 26; it’s exactly as powerful as you need it as soon as it’s manufactured. Some regions don’t have a lot of Pokemon (Orre). Not sure how long it will take a Pokemon egg to hatch in this game but it’s probably longer then it would take to manufacture a gun.
Of course, Pokemon have the advantage that they can use a wide variety of attacks, which the gun can’t. They provide companionship. The regions that have them you can carry around a small army of Pokemon and no one bats an eye where a gun would draw negative attention. But there’s definitely a niche for guns.