When it comes to Team Rocket, the early seasons of the Pokémon anime threaded a thin needle to ensure that while they were a valid threat, they weren't so dangerous as to possibly win. One key component of this -- aside from their general incompetence and comedic relief role -- was to carefully pick and choose which Pokémon they could control.
So, while it is true that James did briefly own an utter powerhouse of a Pokémon, there are plenty of good reasons why he didn't keep it for long.
In Season 1, Episode 15, "Battle Aboard the St. Anne," James was conned into buying the fish Pokémon Magikarp by a now-infamous salesman. Spouting blatant lies about Magikarp laying 1,000 eggs at a time (which, while it may seem true to some real-life fish, is definitely not how Pokémon eggs work), he convinces James that he could easily breed and run a Magikarp farm, selling each for 100 dollars and become an overnight billionaire.
While it's easy to see how this appeals to the Team Rocket member, with its golden Poké Ball and "hard work" not exactly being James' favorite words, the salesman neglects to tell him a few things -- like the fact that Magikarp can barely swim, or what it evolves into.
Being unable to swim soon turns out to be a huge detriment -- in the next episode, "Pokémon Shipwreck," the titular event happens to the very boat they're on. While Ash, Brock and Misty are able to escape thanks to their strong water-types, they forgot that Team Rocket doesn't have any, forcing them to rely on Magikarp. While they do somehow manage to get to the surface, in one of the early season's darker moments, it appears that Magikarp's weak fins have caused its master's untimely demise. Ash and co. are even about to give them a burial at sea!
James is understandably less than enthused when he comes to, and promptly (and literally) gives Magikarp the boot. Unfortunately, whether from outrage or the experience gained from trying to swim one more time, Magikarp promptly evolves into Gyarados and summons four fellow dragons. They all use a combined Dragon Rage to send the group flying to the island of giant Pokémon, yet we can't help but wonder -- what might have been different if James had been a little more like his usual Pokémon-loving self towards his Magikarp?
A loyal Gyarados is quite a formidable opponent, with access to moves like Hyper Beam, Dragon Rage, and Hurricane. A properly trained Team Rocket Gyarados could make use of its Intimidate ability to inspire fear and get others to give up their Pokémon without a fight. It would also allow Team Rocket to easily crush any person or even building that gets in their way with a simple swipe of Gyarados' tail. The only saving grace of the concept of Team Rocket controlling such a powerful Pokémon is that as a water/flying type, a certain Pikachu's electric-type moves would do four times as much damage.
But while Ash's Pikachu would be a bad matchup for Team Rocket, Gyarados is notoriously good at covering its weaknesses. It's able to learn Ground-type moves like Bulldoze and Earthquake, and even Fire-type moves like Flamethrower. As a result, Gyarados would have most likely helped during the times when Team Rocket escapes in their hot air balloon, using Earthquake to help them make a clean getaway and stop any potential pursuers.
Now that Ash is the Alola League Champion, the "threat" of Team Rocket having a powerful Pokémon is less of a threat and more of a challenge. The fact remains that in the beginning of the series, Team Rocket were more experienced trainers than Ash. But experience doesn't necessarily equate to knowledge or skill, and so it was that they lost a potentially lethal teammate in Gyarados at best, and a nice gift for the boss at worst.