The riddle
Why Did the Banana Go to the Doctor?
Peeling against feeling
Peeling and feeling rhyme perfectly. Wiktionary gives them as /piːlɪŋ/ and /fiːlɪŋ/, which differ in one sound at the start. The first is made with both lips pressed together, the second with the lower lip against the upper teeth. Said fast, "peeling well" is easy to hear as "feeling well", and a visit to the doctor is the usual result of not feeling well. The sound-alike is close, though not identical, and the joke leans on the ear being willing to forgive the gap.
What a banana plant is
Wikipedia calls the banana plant the largest herbaceous flowering plant, meaning it is a giant herb and not a tree. What looks like a trunk is a pseudostem, made of tightly packed leaf stalks instead of wood. The fruit is botanically a berry. India led the world in 2022 with about 34.5 million tonnes, the article says, with China second at about 11.8 million tonnes.
The part that comes off
Peel is the outer skin of a fruit, and as a verb it means to strip it away. Ripe banana peels can be several colors, though the common dessert kind is yellow. The riddle makes no claim about what is wrong with the banana, which keeps the joke light: all it needs is a fruit with a skin and a patient who is a little off.
Pairing it with a sibling
Food jokes about a doctor visit share a shape, and two of them can be told back to back. The cookie one, why did the cookie go to the doctor, turns on a different word. Listeners can try to guess which sound will be swapped before the punchline arrives.