Why does anyone stay friends with Sheldon on BBT?

So right before i go to bed i watched a few episodes on Big Bang Theory. And frankly, i am amazed at how anyone can remain friends with Sheldon. The first episode i saw he was pissy because a 15 year old Asian boy was much smarter than him and getting soem kind of award. So of course he started bugging his "friends" after dramatically giving up on teaching. Which just pissed everyone else off. The second episode he refused to let the other members of the physics bowl team answer questions so they kicked him off the team. He started a new team, got some other members but of course he answered all the questions. Final question comes, he doesn't know it, but the janitor did because he was a former Russian physicist before coming to America. Well, Sheldon would rather lose than let someone else give the right answer.

So i guess what i'm wondering is, why does anyone like this guy? I mean, i get there are sitcom characters who have rough edges and are not always easy to get along with. But let's take for example, Joey Tribiani from Friends. Yeah, he's not the brightest, did allow himself to be trapped in a cabinet by a guy who robbed them, and dosen't have a great track record of treating women well. But he does genuinely care for his friends and is there for them. And he may not call a woman back but he's never been abusive or violent. He did act like a bit of a manchild when Monica and Chandler were moving out of the city but you could understand why. He had flaws but he was likeable and didn't push the audience away.

Sheldon, to me anyway, is extremely smart, but is so annoying and arrogant that you don't care to see what he can do with his genius. I would much rather watch an episode with just Leonard and the other two. And it's nothing against Jim Parsons, who I've heard many times on radio. Very funny guy, seems genuinely grateful for this job he's had for so long. I have nothing against him, he simply delivers what the writers give him. But a lot of the time what they give him is bad. But perhaps that's the point. I guess on that second episode, most sitcoms would have ahd Sheldon agree to let the other guy's answer be taken to win, to show he could accept someone else knowing the answer. But this isn't a typical sitcom and so Sheldon stays Sheldon. I'll give them props for consistency but it doesn't make for a very likable character.