To bring up an issue that has already been concluded.
If an argument erupts, and it's one that has been previously settled in the past, then the idiom "beating a dead horse" might be said by someone who sees any further discussion on the topic as pointless.
This phrase may originate with horse racing, where horses are sometimes "beaten" by their riders to get them moving faster. Depending on the rules, a jockey usually has access to a riding crop, which is sorta like a miniature whip, and this is used to slap the horse on the thigh. The horse responds either by running faster, or not at all if he's too tired.
While there is much controversy involved with how race horses should be treated, the "beating" of the horses during a race has a purpose: it makes them go faster. On the other hand, if the horses were dead, then there really wouldn't be much of a purpose, or point, in beating them, hence the meaning of the phrase.
An early written form of this idiom goes back to at least 1859, recorded in the Watchman And Wesleyan Advertiser newspaper in London. Inside there's an article that reads:
"It was notorious that Mr.Bright was dissatisfied with his winter reform campaign and rumor said that
he had given up his effort with the exclamation that it was like flogging a dead horse."
Flogging is just another word for beating.
Reference: newspaperarchive had a digital copy of the newspaper containing the idiom in the quote above.
* Why do you insist on beating a dead horse by bringing up these ancient problems of ours? We're not going over them again!
* Blake wanted to debate with his friends about which of the two cars had better gas milage, but they said the argument would be like beating a dead horse.
Note: The origins for many phrases and sayings are so unclear, it's like trying to find something at the bottom of a muddy river! However, while it's not the case for every phrase, most of what you see are the more popular theories that are around that try to discern how a phrase came about. Keep in mind, though, that these are merely theories, and are not a 100% confirmation!
Additionally, the quotes you see coming from old books, poems, newspapers, and so on, are there to give you, the reader, an idea on how far back in time some of these idioms go. Consider this also: If you see a quote from William Shakespeare, and he's using some expression, it doesn't necessarily mean he's the guy that came up with it. Maybe he heard it from a friend, who really knows! I do try to list the oldest recorded forms of a phrase that I can find, but it's always a possibility that I missed something.