To beat a dead horse means that whatever you're doing is pointless as there will be no outcome in doing what you're doing.
Basically beating a dead horse means a particular effort is a waste of time as there will be no outcome in whatever effort you're putting in.
The expression of "beating a dead horse" comes from and originates from the mid 19th century where it was acceptable practice to beat horses to make the horses go faster.
Then the expression of beating a dead horse came to mean that if you beat the dead horse there will be no outcome.
To beat a dead horse would be pointless because there would be no outcome of beating the dead horse as it would not be able to go faster or do anything.
When someone says there's no use in beating a dead horse they are saying it's pointless to do something you're doing.
The expression of beating a dead horse is also known as flogging a dead horse which is an idiom that means a particular effort is a waste of time as there will be no outcome.