At first I thought they were from the merge of my MyHeritage and Ancestry tree, but I'e verified they are being created as part of the TreeShare process.
Here are scenarios that will cause duplication.
A couple has several children, for some reason one of the children will only be linked to one parent, or the father/mother relationship on one is reversed.
One of the parents is duplicated because one of the genders is missing or wrong, and they are merged, resulting in flipped relationships and thus duplication of all the children.
I feel this is something RootsMagic should test for and either take into account or provide a warning during the TreeShare process.
Part of this is due to the massive amount of clicking that's required to get anything done with TreeShare, with it easily taking 20-30 clicks PER PERSON if you have someone with a lot of facts assigned to them.
Which you're in a click frenzy just trying to get some work done it's easy to miss things like swapped mother/father, and VALLA! now you have a bunch of duplicates created. On old families that could have 10-12 children that's a LOT of cleanup. The only way to correct it is fix the relationships and duplicates (manually) in RootsMagic AND replicate those corrections on Ancestry. If you don't next TreeShare will replicate them again.