The phenomenon you're referring to is called "false memory." False memories occur when a person recalls events or details that did not happen or are different from what actually happened. These memories can be vivid and feel very real to the person experiencing them, even though they are not based on factual events.
In the example you provided, the false memory of Groucho Marx making an off-color joke on television is likely a result of a combination of factors, including the spread of misinformation, the desire to believe in a particular narrative, and the human brain's natural tendency to fill in gaps in memory. When people hear a rumor or story that resonates with them in some way, they may incorporate it into their own memories, even if it never actually happened. This can be a particularly common occurrence in cases where the false memory is related to a well-known figure or event, as people may feel more confident in their recollection if they believe that many others also remember it.
It's worth noting that false memories can be very persistent and difficult to correct once they have taken hold. This is because the brain processes false memories in the same way it processes true memories, so they can become deeply ingrained and resistant to change. Additionally, attempts to correct false memories can sometimes backfire, as people may become even more entrenched in their beliefs when faced with contradictory evidence.