This need is clearly more extreme in some performers than others. Some try to be all things to all people so as to get that feeling of affection. This is why they will avoid overt or even subtextual political content in their material. They know that this has the potential to divide the audience. So they go for universal, observational "truth comedy" instead.
Others are a bit more edgy. They crave something ambivalent. They quite like the sound of nervous laughter. And they'll do jokes about taboo subjects in order to get it.
But one thing's for sure: No comedian ever seeks widespread hatred -- or indifference for that matter. They do crave affection to some degree, even if it's from a certain demographic (pretty young women, for example!).
In any case it just isn't comedy unless you're getting laughs. And to engineer them you have to have the audience's relaxed attention, and some kind of identification with you. They have to warm to you at least a little for the whole process to work. If they don't, they'll look away and talk among themselves. If that happens you'll "die". So general likability is almost a basic requirement.
It's not unlike being a salesman. While it's always desirable to have a good product to sell, in the end people are much more likely to buy things from those they like.
So there are several reasons why the drive to be liked is huge in so many comics. And it does point to a psychological flaw, or weakness.
When I see this strong craving for affection I think: aren't your friends enough? Why want more of that attention? Anyway, the affection that comes with laughter is not really meaningful. It's like fame, another thing comics crave. It's so strange to want that admiration from so many people you'll never meet or even get close to you if you do. And if you do get close to them, odds are your fame will get in the way of a healthy relationship.
So that desire to be liked can be pathological, although it's not in most comics. Many of them keep it in check, even though that's what's driving them to some degree.
But for some it's highly destructive. This was the case with Robin Williams, I believe. Of course he had other issues such as drug and alcohol abuse. But he was always trying way too hard to be liked, too! And I think that inner need had something to do with his suicide. It was like there was a hole in his heart that he really needed to fill. But no matter how hard he tried he just couldn't do that.
I think this element of needing to be liked is one of the reasons many people tend to grow out of comedy. After a while you realize that you can't charm everyone. Some people are gonna hate your guts no matter what you do or say! You can't please everyone, so you just gotta please yourself, as the song goes ...
I feel that's what has happened with me. Being liked was quite a drive in the past. But as I've gotten older I've realized that it's not important in the grand scheme of things. Much better to learn to accept yourself, and just have a few friends whose affection is real and enduring.
Now I'm no longer seeking that ephemeral public affection, I don't need to get up and get laughs like I used to. Sure, I would like to perform again. It's a helluva buzz apart from anything else. But the allure of it is nowhere near as strong as it was, say, 15 years ago.
This aspect of standup comedy is another reason why it is mostly a young man's game. It's nerve-racking and risky, and thereby suited to gung-ho types. It's also motivated to some degree by what could be described as emotional immaturity.