Let me nail a message board post to the church door and say that writers have been creating unlikeable characters since the very beginning of Star Trek. The test in writing isn't really whether a character is likeable, it's whether they're interesting.
When characters are picture-perfect, kind, sweet, generous, sort their recyclables and are genteel to small animals, half the time a reader is bored to madness and the other half of the time just wants to throw up. There's usually nothing worse than a character who you're expected to like all the time.
Sure, on Dyansty, Alexis Carrington (/Colby/Dexter/Carrington) was a capital bitch, but she was interesting.
Krystal Carrington was a perfect angel, and yet she held your attention like a bottle of Ambien.
The genius of Roddenberry's original Star Trek show was not only how well he knew this, but how well he executed it. What most fans never consider, even though somehow they instinctively know and understand it, is that many of their favorite characters really are inherently unlikeable.
Kirk has his way with women across the galaxy, flaunts the rules whenever he feels like it, cheats on academy tests and and is even initially willing to tolerate genocide in revenge for his son's murder.
Spock remains the veritable poster child for unlikeability, insensitive and aloof, virtually no interpersonal skills and a constant air of arrogance and superiority; he has, as the saying goes, a very high opinion of his opinion.
McCoy, meanwhile, is an emotional, cranky old curmudgeon who is pretty much an outright racist, even right to someone's face. (We smile when he grumbles about that "damn green-blooded Vulcan"--but how endearing would it be if he instead were calling Nimoy a "damn hook-nosed Jew"? And yet, really, it's the same thing.)
I say this not to kick up a hornet's nest of controversy, but to point out that we like these characters not for their virtues, but for their virtues in spite of their flaws. And the characters clearly feel that way about each other.
Kirk is a man of action, trusting his first instincts and rarely questioning his judgment afterward--just about the opposite of Spock's studied, calculated, introspective Vulcanism. And yet, it's entirely believable that they're best friends. The same is true of Spock and McCoy's constant and yet totally affectionate insult-trading and one-upmanship.
It's okay for us to like these characters, because, very obviously, they like each other. But it's McCoy's grumbling that we find likeable, not the fact that he's dedicated his life to waving around a lipstick tricorder to make people feel better. It's Spock's unassailable logic that we find interesting, not the fact that he's respectful to his mother and father.
In fact, it's almost fair to say that we like their flaws more than we do the type of things that normally make a person "likeable".