There are comedians who write jokes for late night talk shows, sure. It’s a difficult gig to get. I know a couple of comedians in LA who read the paper every morning and then fax in current-event jokes to The Tonight Show. If their jokes are used in the monolog, they get paid.
More generally, humor magazines and joke books have been around for centuries. There are writers who specialize in humor writing. There are incentives for funny people to produce jokes, either a monetary incentive or just because people like to share funny stuff.
Given his numberless contributions to Readers Digest, Parade, and every shoppers weekly across America, I’d say Joey Adams wrote most of the jokes of the second half of the 20th century. And a fair chunk of them from the first half.
Yeah but whose writing the viola jokes and the engineer jokes? Unless you’re publishing The Big Book of Viola Jokes, it’s just a pastime right? Plus you can’t tell the Biker’s Mustache joke in your stand up. I wouldn’t wanna see the HBO special where a comedian told the average joke.
The Killing Joke by Anthony Horowitz has the protagonist trying to track down the source of a particular joke. He ultimately finds that there is a common source for all jokes: an offshore top secret joke factory set up to take the minds of the population off serious subjects. No, I didn’t find it very convincing either. Asimov’s theory is much more appealing and explains why we groan rather than laugh at puns.
The real answer, surely, is that most jokes are made up by regular people, who tell them to their friends. Haven’t you ever made up a joke, and told it? I know I have, on many occasions (I am not saying any of mine were good jokes).
Most of these jokes are not very good, but occasionally one will be good enough that one or two of the first group to hear it will repeat it, maybe a bit modified (and perhaps even improved) to someone else, and it a sort of natural selection process sets in, with the better jokes getting spread and the worse ones (for the most part) dying out quite quickly.
I suspect that even many of the jokes “written” by professional comedy writers have their origins from this process. The professionals may polish them up a bit, and perhaps sometimes attach some “topical” names to them, and I am sure that they tell them better than most people, but the basic joke ideas mostly come from the primordial slime of human gossip.