But I also think it's an overreaction for an adult joke teller to jump on the punchline-giver-awayer for "ruining" the joke. It's a joke, not the nuclear codes.
It depends on the people, and the relationships. Making people laugh is a way of bonding with a group, having someone actively prevent or usurp that can be a rejection.
It seems pretty clear from this thread that there are multiple schools of thought on question-form jokes. It's not fair to "jump on" someone for responding to the joke when that's the style they're accustomed to. If the teller pauses for a response (e.g., "I don't know, what?"), as many question-form joke tellers do, then it's even more unfair to get upset if the response isn't the particular response desired.
However, there are plenty of jokes that aren't in the form of a question. If a joke teller feels that the joke is ruined or that their interactions with the group have been usurped when someone else answers the question (by providing the punchline), then IMO the most practical solution is to use a different form of joke. Getting angry at someone in the group for answering a question they were asked isn't likely to improve one's bond with the group either, unless it's a group of bullies. There are one-liners, story-style jokes, knock-knock jokes, etc. But IMO this falls under "Don't ask questions if you aren't prepared to hear the answer." I understand it could be disappointing if one expects to be able to both ask the question and provide the answer. But if that doesn't happen, IMO the onus is on the joke-teller to either A) change the type of jokes they tell to ones that aren't questions, B) accept that their listeners are going to answer, or C) aim for jokes that will stump their listeners so they can provide the punchline after everyone else gives up (and fall back to (B) if someone guesses it after all).