Cartman generally behaves in a mean way and not solely towards Kyle. Neither of Kyle, Stan or Kenny is antisocial and thus in desperate need of friends. Why do they keep Cartman in their friend circle?
I wouldn't say that Cartman is anyone's friend, but the rest of the kids tolerate him being around. The best proof of that comes from their response, when Cartman wants to go to Somalia to join the pirates - Kyle is quite happy to even buy him a plane ticket and comments with enthusiastic "good!" when he finds that Cartman has indeed gone to Africa.
While Eric is annoying to have around as a "friend", he can be very dangerous as an enemy: he either outright killed or orchestrated the death of many people, and even tricked one kid to eat his deceased parents. It is definitely not someone that you'd like to be on the wrong side of!
Cartman can also be entertaining - either as the butt-end of the "fat jokes" or because he has enough leadership skills and imagination, to make other kids join in his schemas - be it turning ginger kids into fanatical hair-color supremacists or convince the team to "grind" levels in World of Warcraft to kill a trolling player.
All in all, he is always useful to have around, even just to make teams even