I believe that there are several scenarios that can create this issue you’re describing.
This is from a previous post on fb from Rene “The way to prevent so much duplication in TreeShare is to select all the items you want to include in RM before clicking on Accept Changes. Then it will create only one master source no matter how often used for that person.” See also here.
I am not active on ancestry right now but as I recall I get duplicate sources and associated media if I add a new source to an existing fact in Ancestry and then use treeshare to import that new source to rm. It could be user problem causing that. Others have cited the differences in the way that ancestry and RM treat marriage as a cause of some duplication.
For what it’s worth, I check the existing fact after each treeshare. I usually find that I want to add additional details to the source and/or citation anyway, so going to look at the fact is just a part of my workflow. I also edit the source name so that I know it’s been updated. That makes it very easy to identify and delete duplicate sources right away.