There are many theories linked to this, such as theories like Giovanni's Ash's real father and he keeps TRio to let Ash defeat them and gain more experience. But I've compiled some of the best reasons/theories out there:
- TRio's members are all actually very valuable.
Jessie's mom is Miyamoto, a high-ranking Class A member of Team Rocket who disappeared while on a mission to look for Mew. Miyamoto is presumed to be dead according to some while possibly still alive according to others, but she is/was close to Madame Boss, Giovanni's mother. It is possible that Miyamoto's influence and power has extended to Jessie especially if her mother died while on a mission for Team Rocket. Giovanni may be keeping her around as a tribute to Miyamoto.
Meanwhile, James as we all know hails from an uber, filthy rich family who owns tons of mansions and there are several theories as well.
Theory A: James' parents, who are all so rich, probably hired a PI to hunt down James. But they saw how their son wanted to have freedom and joined Team Rocket, and hence they struck a deal with Giovanni. They will provide him with a large sum of money each month, some of which will be given to James (and by default TRio) as his "salary" to fund his activities. It makes sense because TRio sometimes don't even have money to eat but can whip up high-tech gadgets and machineries which are probably really expensive.
Theory B: James is from such a rich family that Giovanni wants to keep him around for his family connections. Besides James is too involved in Team Rocket that if he ever leaves, he has the necessary monetary funds to bring down Team Rocket by hiring other Trainers and exposing Team Rocket's secrets such as their base or headquarters and their plans and missions.
And then we have Meowth: a talking Pokemon who can translate between the human language and the "Pokemon" language. When you think about it, Meowth has to be the greatest asset to Team Rocket. With Meowth, they can know exactly what a Pokemon is saying without using Telepathy or counting on Legendaries who use Telepathy! Meowth is the liaison between the Pokemon and humans and serves as TRio's very own translator.
- There is no real reason to get rid of TRio
It is highly speculated that TRio doesn't get pay from Giovanni, and that they keep taking odd jobs to get enough money to fund themselves. TRio also seems adept at repairing their machines and it seems that they need little money to build their machines. They are loyal to Giovanni and there is no harm in keeping them around, especially since they have served Giovanni faithfully and even saved his life. They played a huge role in the Unova arc, and were actually competent for once!
Giovanni has nothing to lose in keeping TRio around.
- TRio gives good publicity to Team Rocket
Since Team Rocket is primarily based in Kanto, when TRio visit other regions in pursuit of Pikachu, they encounter many who don't know what/who Team Rocket is. TRio indirectly and directly publicices Team Rocket and spreads their influence across the globe such that people will at least have heard of Team Rocket and find them fearsome/evil.
- THEORY: Giovanni is... Ash's father.
The ever so popular theory is that Giovanni is Ash's father and that he left Delia years ago to become the leader of Team Rocket. He found out that ten year-old Ash Ketchum had just become a Pokemon Trainer, and assigned the weak and simple-minded TRio to tail Ash around. Through TRio and their constant battles, he indirectly helped Ash gain more experience, evolved his Pokemon and felt a sense of satisfaction and achievement in defeating TRio. And that's why Giovanni keeps them around -- too boost, support and oversee Ash's journey.
Read more about this theory at: https://www.reddit.com/r/FanTheories/comments/1bv2j1/giovanni_is_ashs_real_father_long/