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 outrightvery 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