I don't "get" the second joke, sorry.
In the first joke, there are two parts.
The first part of the joke seems annoying. You can't guess the answer, because it's not true. Ducks don't have webbed feet in order to stamp out fires. The riddle can't be guessed because it doesn't make any kind of sense. Obviously a duck cannot put out a fire that way, and would get burned in the process.
When we hear the second part of the joke, we have stopped thinking, because logic didn't work on the first part. We're just going to say "I don't know, why?" just to get it over with. The second part of the joke then surprises us because it does have a crazy logic to it, and we suddenly understand the "point" of the first part. It was a setup for the second part.