It’s not so much a “duplicate” but a side effect of the fact that GMail’s system is not like a typical e-mail system.
GMail has no concept of folders. All your mail is in one large “All mail” bucket. You assign labels to messages. The web interface lets you click on labels to filter the output to only show messages with the selected label. Even “inbox” and “trash” are just labels.
Traditional mail apps (including Mail.app, Thunderbird and Outlook) don’t work this way. They have actual folders, which you can move messages between.
IMAP is based on the concept of folders. In order to try and fake it GMail presents each label as a folder. But it’s an illusion. If you assign five labels to a message, you will see that message in six folders - one for each label and “All mail”. When you “delete” a message, you are really assigning the “Trash” label to it (and might also remove one or more other labels). When you move a message to a new folder, you are deleting the old folder’s label and adding a label for the new folder.
From the Google web site, you can set various preferences to customize what happens when typical IMAP actions are performed (e.g. delete message, move to folder), but nothing changes the fact that GMail is label-based not folder-based and their IMAP interface is providing an (imperfect) translation layer between the two concepts.
A lot of the problems people have with GMail and mail applications is a result of this. Unless you have a mail app that knows about and can work directly with GMail’s system of labels, you are going to see behaviors which don’t seem to make sense. Like messages being “duplicated” when you move them between folders.