Users are being duplicated in the People directory each time Confluence is restarted, until a re-index is performed (at which time the duplicates are removed).
If you encounter a bug where your people directory is displaying duplicates and this isn't fixed by performing a re-index, it's likely that you're affected by
Please take a look at this Knowledge Base article for more information:
Step 1. Rebuild the search index to remove the duplicates in the people directory.
Step 2. Perform an action that will add a different type of indexing task to the queue before your instance is restarted - e.g. create a page in Confluence.
If this doesn't work for you, please raise a support ticket so that we can investigate further.