I think that "funny" is one of those words that you're going to have a real bad time trying to delimit or explain entirely. But, uh... fuck it. Here goes. In Wittgensteinian fashion, I mean them with the implicit caveat that "things are funny for this reason... except when they're not."
I more or less buy the "unexpected" thesis about humor: humor largely comes from a mismatch of our expectations with what we encounter. I think the unexpected thesis covers Bergson's thesis that funny comes from an autonomous gloss on the organic, flexible parts of life, precisely because you don't expect the robotic to intrude on the dynamically social, and so when it does, well, all-aboard for giggles-town. I also take 'expectation' to be super loose there. So, it's not like everything funny is definitely a surprise; it means that things don't happen the way you think things should be or ought to be or, whatever, and there isn't something overriding like disgust or fear or whatever.
Our expectations also evolve very quickly, which is why it isn't funny when someone keeps establishing conventions just to break them over and over; pretty soon you catch on to what they're doing. That's also why, even though robots are generally hilarious (apparently), if there's a guy whose entire fucking schtick is 'robot voices at parties' he's hilarious for like one party and then, "Oh, man, here comes robot guy. Greeeeeaaaaat."
I think that also explains why things like wordplay is funny; it draws connections between unexpected branches of language. Same with historical references: "I wasn't expecting you to compare his relationship to the Bay of Pigs, but goddammit that works." And so on. It also explains why 'funny' varies so much across cultures - different cultures have different social norms and different individuals have different expectations.
I think Bergson's dismissal of that thesis is super hasty and not thorough enough. "Scary shit is unexpected too, why isn't that hilarious?!" Well, because evolutionarily, it was way more important that we find murdery stabby shit scary instead of hilarious. When you're scared, it isn't that you're observing a mismatch of expectations, it's that your expectations are evolving very rapidly: "OH MAN THAT GUY IS GOING TO STAB ME AND NOT JUST A COUPLE TIMES LIKE A BUNCH AT LEAST THE NUMBER OF STABS I CAN SURVIVE PLUS ONE." But cheesy, shitty horror movies are hilarious once you get past the scary part. Ever ridden a roller coaster where something jumps out at you? Maybe you're startled and scream, and then you laugh because "that mummy isn't going to hurt me but damn, I was not expecting that."
I think, with respect to edgy or black or off-color humor, the social aspect of humor helps explain why the hearers' perceptions of the teller are really important. Why do people from really privileged positions have trouble being funny? Because it's hard to tell if they really hold the beliefs they're espousing or not. Imagine a super-rich guy going into a comedy club and going, "What's the deal with lazy poor people?!?!" You'd be horrified because that doesn't contrast at all with your expectations; it just confirms that oh my god people think like that. Especially in a standup context, there exists a sort of contract between the comic and the audience: "Guys, we all know this isn't okay, we all expect this to be terrible, so I'm going to talk about it and it'll be funny precisely because we all acknowledge that this really isn't okay." (Part of what makes Louis C.K. fucking incredible is how good he is at establishing this contract.) Rape jokes are so controversial because given how genuinely terrible rape is, and how subtle power shifts lead to victim-blaming and under-rug-sweeping, and how far we generally, as a society, yet have to go to get rid of dismissive views of rape, it's hard to sell an audience on "I have all the right beliefs about rape, we all agree here that rape is fucking terrible and it's never the victims fault and rapists are genuinely awful awful people. But here's a rape joke." Audiences just don't have the expectation that comics understand the terribleness of rape, because we're not at that point yet, and it's generally not fair to ask that of an audience.
If this thesis seems problematically broad or overreaching, good. I'm perfectly willing to concede that you might not be able to capture everything with a strong version of the expectation thesis; humor is one of the most diverse areas of human life. I think you have to be willing to consider "expectations" very broadly to capture even most of what's funny. But why do we look for a theory of humor? Just to understand it? We already know what things we find funny in virtue of finding them funny. To learn to produce it? If you start with the expectation thesis as a scaffold to build on, like training wheels, it'll take you pretty far.
Anyway, those're my thoughts on the philosophy of humor. This was a super-good episode, good work guys!